BAUD1

(Difference between revisions)
Jump to: navigation, search
Admin (Talk | contribs)
(Created page with "= <span class="f_Header">Action</span> = Changes the baud rate for the second hardware UART. <span style="font-family: Arial;"> </span> <span style="font-family: Arial...")
Newer edit →

Revision as of 12:45, 7 February 2013

Contents

Action

Changes the baud rate for the second hardware UART.

 

 

Syntax

BAUD1 = var

BAUD1 #x , const

 

 

Remarks

Var

The baud rate that you want to use.

X

The channel number of the software UART.

Const

A numeric constant for the baud rate that you want to use.

 

Do not confuse the BAUD1 statement with the $BAUD1 compiler directive.

 

And do not confuse $CRYSTAL and CRYSTAL

 

$BAUD1 overrides the compiler setting for the baud rate and BAUD1 will change the current baud rate.

BAUD1 = ... will work on the hardware UART.

BAUD #x, yyyy will work on the software UART.

 

 

See also

$CRYSTAL , $BAUD , $BAUD1 , BAUD

 

 

ASM

NONE

 

 

Example


'-------------------------------------------------------------------------------
'copyright : (c) 1995-2005, MCS Electronics
'micro : Mega162
'suited for demo : yes
'commercial addon needed : no
'purpose : demonstrates BAUD1 directive and BAUD1 statement
 
'-------------------------------------------------------------------------------
$regfile = "M162def.dat"
$baud1 = 2400
$crystal= 14000000 ' 14 MHz crystal
 
Open "COM2:" For BINARY As #1
 
Print #1 , "Hello"
'Now change the baud rate in a program
Baud1 = 9600 '
Print #1 , "Did you change the terminal emulator baud rate too?"
Close #1
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language