Picht
15.08.2006, 17:18
Hallo ich müsste den RS232 Ausgang meines Controllers AT90S2313
von 8N1 auf 8E1(also Even) in Bascom umstellen.Hier das Testprogramm.
Läuft aber nicht.Hat jemand eine Idee.Die Buffer wurden schon zurückgesetzt.
$regfile = "2313def.dat" ' specify the used micro
$crystal = 3686400 ' used crystal frequency
$baud = 9600 ' use baud rate
$hwstack = 40 ' default use 32 for the hardware stack
$swstack = 40 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
Config Com1 = Dummy , Synchrone = 0 , Parity = Even , Stopbits = 1 , Databits = 8 , Clockpol = 0
'setup to use a serial output buffer
'and reserve 20 bytes for the buffer
Config Serialout = Buffered , Size = 5
'It is important since UDRE interrupt is used that you enable the interrupts
Enable Interrupts
Print "Hello world"
Print "test1"
Do
Wait 1
'notice that using the UDRE interrupt will slown down execution of waiting loops like waitms
Print "test"
Loop
End
von 8N1 auf 8E1(also Even) in Bascom umstellen.Hier das Testprogramm.
Läuft aber nicht.Hat jemand eine Idee.Die Buffer wurden schon zurückgesetzt.
$regfile = "2313def.dat" ' specify the used micro
$crystal = 3686400 ' used crystal frequency
$baud = 9600 ' use baud rate
$hwstack = 40 ' default use 32 for the hardware stack
$swstack = 40 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
Config Com1 = Dummy , Synchrone = 0 , Parity = Even , Stopbits = 1 , Databits = 8 , Clockpol = 0
'setup to use a serial output buffer
'and reserve 20 bytes for the buffer
Config Serialout = Buffered , Size = 5
'It is important since UDRE interrupt is used that you enable the interrupts
Enable Interrupts
Print "Hello world"
Print "test1"
Do
Wait 1
'notice that using the UDRE interrupt will slown down execution of waiting loops like waitms
Print "test"
Loop
End