X10 Community Forum
🔌General Home Automation => Other Automation Systems => Echelon/Lonworks => Topic started by: radnek on November 25, 2009, 03:23:06 AM
-
Hello,
Recently, I started programming in Neuron C. I got MiniEVK and want to send some characters from MiniEVB serial port to my PC.
This is my program:
#include <isi.h>
#pragma num_alias_table_entries 0
#pragma run_unconfigured
IO_10 output serial baud(1200) terminal;
mtimer repeating sendCharLoop = 1000;
when(timer_expires(sendCharLoop)) {
io_out(terminal, "a", 1);
}
I'm expecting to receive once a second one byte in a terminal opened in PC. Value of this byte should be a value of 'a' ASCII code (61 in hexadecimal). However, in
terminal are printed some strange values. This is example of printout from terminal in hexadecimal:
f4
f4
f4
f4
f8
f4
f8
fc
f4
f4
f4
I get similar result when try to send other character or longer string.
I'm using Windows HyperTerminal and Termit terminal with configuration:
baud the same as in neuron C programme,
8 data bits,
no parity,
one stop bit,
no flow control.
Serial port in MiniEVB is connected to my PC thorough RS232<->USB adapter. I have checked connection to serial port without adapter in another PC, but result was the same.
Any help will be appreciated.
Radek
-
I found the reason of my problem. The problem only occurs with the FT3120 EVB which has a 20MHz clock. The baud rate in the code is 1 to 1 with clock 10MHz. So with 20MHz clock the baud rate is double the rate in a code.
Radek