Full Duplex 7 / 8 data bits
PatrickS
Posts: 2
Hi all,
I am new here, playing around with a propeller chip since a few days.
I connected a GPS which sends data with 4800baud, no parity, 8 data bits, no control bit and one stop bit.
I tried to forward this data with full duplex object from P0 to P30 but receive only strange characters in hyperterminal.
If I use P31 instead of P0 and tye in characters - I have the same.
Do I change the 8 databits to 7 for the last test, then I get the same character back I typed in before.
Has this something to do with those different modes? I tried 0, 1 and 3 but still do no get what I expect.
Kind regards
Patrick
See below the code I am using:
I am new here, playing around with a propeller chip since a few days.
I connected a GPS which sends data with 4800baud, no parity, 8 data bits, no control bit and one stop bit.
I tried to forward this data with full duplex object from P0 to P30 but receive only strange characters in hyperterminal.
If I use P31 instead of P0 and tye in characters - I have the same.
Do I change the 8 databits to 7 for the last test, then I get the same character back I typed in before.
Has this something to do with those different modes? I tried 0, 1 and 3 but still do no get what I expect.
Kind regards
Patrick
See below the code I am using:
CON Out = %1 VAR long s Byte Pin16 , rcvd, Pin17, ins OBJ ser : "FullDuplexSerial" PUB start Pin16 := 16 DirA[noparse][[/noparse]Pin16]:=Out OutA[noparse][[/noparse]Pin16] := 0 '!OutA[noparse][[/noparse]Pin16] Pin17:=17 DirA[noparse][[/noparse]Pin17] := Out OutA[noparse][[/noparse]Pin17] := 0 s := 0 ser.start(31,30,0,4800) '31 incoming PIN, 30 Outgoing PIN repeat ins := ser.rx if ins s++ if ins == $09 'if TAB is pressed s:=0 OutA[noparse][[/noparse]Pin16] := !OutA[noparse][[/noparse]Pin16] OutA[noparse][[/noparse]Pin16] := !OutA[noparse][[/noparse]Pin16] 'OutA[noparse][[/noparse]Pin17] := !OutA[noparse][[/noparse]Pin17] ser.tx(ins) if s == 1 'ser.tx(ins) OutA[noparse][[/noparse]Pin17] := !OutA[noparse][[/noparse]Pin17] 'OutA[noparse][[/noparse]Pin17] := !OutA[noparse][[/noparse]Pin17] s :=0 ' DirA[noparse][[/noparse]16]:=Out
Comments
I still did not suceed - can anyone tell me if he has connected such a device (4800,8,N,1) and looped/shifted this data through the propeller?
I do not understand the assembler code if there is a restriction to a certain number of bytes.
PS: The GPS is connected directly to the propeller, for communication to my PC I am using a MAX232.
Nice Christmas and kind regards,
Patrick
what you're trying to do with all that code, though. If you tell us more
about your setup, maybe we can help some more.
try with this mode settings: ser.start(31,30,%0010,4800) '31 incoming PIN, 30 Outgoing PIN
mode bit 0 = invert rx
mode bit 1 = invert tx
mode bit 2 = open-drain/source tx
mode bit 3 = ignore tx echo on rx
Uwe