Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

UsART in pic 16f877 problem with MicroC and proteus

Status
Not open for further replies.

sudheepsrc

Junior Member level 3
Junior Member level 3
Joined
Aug 8, 2010
Messages
28
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
kerala
Activity points
1,474
pic 16f877 interface through USART in MICROC and proteus.but have problems that is below plz help meee...


void main() {

// Initialize USART module (8 bit, 2400 baud rate, no parity bit..)
Usart_Init(2400);

do {
if (Usart_Data_Ready()) { // If data is received
// Read the received data
Usart_Write('A'); // Send data via USART
}
} while (1);
}//~!




this code actually for tx letter A but see like this plz help..........


 

you probably want to read the compiler manual to see what settings the code requires the terminal to be in.
 

try this code:

char uart_rd;
void main() {

UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize

UART1_Write_Text("Start");
UART1_Write(10);
UART1_Write(13);

while (1) { // Endless loop
if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read(); // read the received data,
UART1_Write(uart_rd); // and send data via UART
}
}


}

goto proteus>>samplre>>vsm for PIC16>>Milfoard Serial LCd>> open it and link your hex file. it works fine!!

 
i using microc have't this functions .but have Usart_Init like.....wt i do?
 

this code is of mikroc. just remove 1 from usart1_init() and try usart_init().
 

thank you...................................

but this function have't UART1_Write_Text("Start");
and why use these two lines
UART1_Write(10);
UART1_Write(13);
 

to display start message
carriage return (behave like enter)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top