hello,
I am using the RCM3200 RS232 port C to read values coming from a UART. The UART is set to 8 Bit, No stop, No parity. 3 Wire communication.
Everthing works fine except reading the data coming in. The UART is sending integers and I am using the RCM3200 sample program called SIMPLE3WIRE to read the data. Here is what is happening;
the program uses serCgets to read the value. the data read is the decimal value of the character read. For example it reads the value zero as 48, a value of one as 49, a value of 2 as 50 and so on. Any value over 9 goes back to zero. I think the reason is that it treats the data coming in as charcters so it sees 10 as a zero.
I also have tried using the serCread function but I can not make that work either.
All I need to do is to read the data coming in from the UART. This data is an INT, preferably a float or long integer. But if the Dynamic C or in my case Dynamic C Premier V 7.32P have problem reading FLOAT or LONG, I can change the UART so it always sends INT.
Any Ideas. Thank You…
Best Regards
bobby