uart program for aduc7026

Thread Starter

satishreddy

Joined Jul 19, 2012
6
hello,
iam trying to communicate on hyperterminal from aduc7026 board but iam receiving some bad character on hyper terminal.SO PLEASE help me to come out of problem.program is shown below

Rich (BB code):
#include<aduc7026.h>
void init_uart(void);
int main()
{
static int i;
unsigned char c[]="HELLO";
init_uart();
for(i=0;i<5;i++)
{
while((COMSTA & TEMT)==0)
COMTX=c;
}
 
void init_uart(void);
{
COMCON=0x80;
COMDIV0=0x93;
COMDIV1=0x00;
COMCON=0x03:
}
 
Last edited by a moderator:

MrChips

Joined Oct 2, 2009
35,093
Very often the problem is caused by incorrect baud rate.
Have you checked the baud rate?
Are you using an external xtal?
Do you have an oscilloscope to check the baud rate?
Why transmit "HELLO"?
To check the baud rate on the oscilloscope I send a single character "U" with a delay between each character transmission.
 

t06afre

Joined May 11, 2009
5,934
Does the board have a logic to RS232 level converter? But I agree most often garbled transmission on RS232 are caused by wrong baud rate. But also sometimes wrong parity settings
 
Top