PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Paritybiteinstellung beim AT90s2313



Picht
15.08.2006, 16: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

linux_80
15.08.2006, 17:25
Hallo,
soviel ich noch vom DB her weiss, kann man beim 90S2312 nix derartiges am UART einstellen, es ist immer 8N1.

Die Möglichkeit die es aber dennoch geben könnte, einfach auf 9 Datenbits umstellen, und das 9. Bit entsprechend selber zu setzen !

Picht
15.08.2006, 17:32
Danke für die Info.Aber wie würde das im Programm aussehen?