fullduplexserial.spin
El Paisa
Posts: 375
Is in the Hydra software a program like fullduplexserial.spin?
I would like to comunicate with a serial device at 115200 baud.
I would like to comunicate with a serial device at 115200 baud.
Comments
On the propeller side of things, this worked:
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
ser : "FullDuplexSerial"
PUB start | b
ser.start(31, 30, 0, 115200)
ser.str(string("I am alive", 13))
repeat
b := ser.rx
ser.tx(b)
(this is just a copy-data).
On the Windows side of things, I compiled the following
program from cygwin. (Cygwin is free and comes with a
C compiler).
I needed to do this because I'm testing my SD/FAT write
routines, and I want to run some intensive tests without
wearing out a card, so I'm doing the block I/O over serial
to a hard disk on my laptop. It's much slower, but it will
let me run many days worth of intensive testing.
When debugging serial communications, I recommend making a loop that sends bytes with values 0, 1, 2, 3, ... up to 255 and then start over again. This is your best chance of at least receiving something even if it's wrong, and once you have a little bit going through you can start to sort out what makes it work better and what makes it stop working.
You·were right, the only thing I changed was the clock settings and the pinouts.
I am using the fullduplexserial.spin
Now I can communicate with a ezLCD-004 Graphics display at 115200 baud.
Thanks again.
James L
Post Edited (James Long) : 12/13/2006 5:11:14 AM GMT