Please login or register.

Login with username, password and session length

Author Topic: Serial interfacing with MiniEVK  (Read 15597 times)

radnek

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Serial interfacing with MiniEVK
« 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:

Code: [Select]
#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
Logged

radnek

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Serial interfacing with MiniEVK
« Reply #1 on: December 12, 2009, 10:03:27 AM »

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
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.