|
Re: TTL port to a serial port on a demo board
In your code example, you are hanging because the queue is full. It will not empty unless there is communications established.
Level shifting: TTL is a 0V to 5V signal. RS232 is usually -12V to +12V. You can not just wire the two together without some sort of level shifter (see Fowlerm's post).
Printf: Indeed, printf statements output a string (the f in printf stands for formatted). I would avoid sending binary (unformatted) data until you have your system well established and debugged. Without a serial protocol analyzer, debugging unformatted communications is very difficult.
JMHO
Mike
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|