serial-communicatins with simple-ide
nomad
Posts: 276
serial-communicatins with simple-ide
hi
in the moment i working with a
propeller professional development-board (PPDB)
my first experiments with serial-com.
base: serialcom from the ppdb with rs232-converter-cable to usb to my linux box
with spin is the communication ok
yesterday controlling 2 servos with simpleide OK
now with c:
after much improvements compile is ok
but the test with linux is not ok
no communications ppdb should send: "$1:2:3:4:"
now what make i wrong, is the code correct:
sending a string to linux
please can somebody help me.
thanks for your help , hints and tricks...
regards
nomad
/code:
/**********************************************************************/
Blank Simple Project.c
http://learn.parallax.com/propeller-c-tutorials
dd. 02.11.2014
name: serialcom1.c
- base : the same HW Config as Spin
- pin 27 = tx yellow transmit
pin 28 = rx green receive
- baud: 9600
- RS232-Converter-USB-Kabel on V3 with /dev/ttyUSB0
- no realy demos here (lcd and xbee)
- compile failures....
- with only fdserial.h included compile ok
ref:
notes:
einbau von simpletext.h
serial.h
fdserial.h
*************************************************************************/
//#include "simpletools.h" // Include simple tools
//#include "simpletext.h"
//#include "serial.h"
#include "fdserial.h"
// rx = pin 28
// tx = pin 27
fdserial *term; // should terminal
int main() // Main function
{
// Add startup code here.
term = fdserial_open(28, 27, 0, 9600);
while(1)
{
// Add main loop code here.
writeStr(term,"$:1:2:3:4:");
//writeChar(term, CR );
dprint(term,"$1:2:3:4:");
}
}
/***************************************************************************/
hi
in the moment i working with a
propeller professional development-board (PPDB)
my first experiments with serial-com.
base: serialcom from the ppdb with rs232-converter-cable to usb to my linux box
with spin is the communication ok
yesterday controlling 2 servos with simpleide OK
now with c:
after much improvements compile is ok
but the test with linux is not ok
no communications ppdb should send: "$1:2:3:4:"
now what make i wrong, is the code correct:
sending a string to linux
please can somebody help me.
thanks for your help , hints and tricks...
regards
nomad
/code:
/**********************************************************************/
Blank Simple Project.c
http://learn.parallax.com/propeller-c-tutorials
dd. 02.11.2014
name: serialcom1.c
- base : the same HW Config as Spin
- pin 27 = tx yellow transmit
pin 28 = rx green receive
- baud: 9600
- RS232-Converter-USB-Kabel on V3 with /dev/ttyUSB0
- no realy demos here (lcd and xbee)
- compile failures....
- with only fdserial.h included compile ok
ref:
notes:
einbau von simpletext.h
serial.h
fdserial.h
*************************************************************************/
//#include "simpletools.h" // Include simple tools
//#include "simpletext.h"
//#include "serial.h"
#include "fdserial.h"
// rx = pin 28
// tx = pin 27
fdserial *term; // should terminal
int main() // Main function
{
// Add startup code here.
term = fdserial_open(28, 27, 0, 9600);
while(1)
{
// Add main loop code here.
writeStr(term,"$:1:2:3:4:");
//writeChar(term, CR );
dprint(term,"$1:2:3:4:");
}
}
/***************************************************************************/
Comments
At the beginning of int main(), add the following code. I don't know if that will fix it, but it is something worth trying.
Also, you need to change the baud rate to 115200.
Best of luck,
ValeT
thanks for your help
today i testing this and make eventualy a reply
regards nomad
your hints are OK
its running , i work with fdserial.h then fdserial_close(term) is ok, baudrate 115200 ok
thanks for your fast help
regards
nomad
Glad I can help !