Nov 16, 2013 #1 A ankiterect Newbie level 4 Joined Nov 16, 2013 Messages 6 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 41 can anyone tell me that why my circuit not giving correct output. my proteus circuit my virtual terminal output my mikro c code Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 void newline() { UART1_Write(13); // Carriage Return UART1_Write(10); // Line Feed } void main() { do { UART1_Init(9600); // Initialize UART module at 9600 bps Delay_ms(100); // Wait for UART module to stabiliz UART1_Write_Text("hello"); newline(); Delay_ms(100); } while(1); } Last edited by a moderator: Nov 16, 2013
can anyone tell me that why my circuit not giving correct output. my proteus circuit my virtual terminal output my mikro c code Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 void newline() { UART1_Write(13); // Carriage Return UART1_Write(10); // Line Feed } void main() { do { UART1_Init(9600); // Initialize UART module at 9600 bps Delay_ms(100); // Wait for UART module to stabiliz UART1_Write_Text("hello"); newline(); Delay_ms(100); } while(1); }
Nov 16, 2013 #2 jayanth.devarayanadurga Banned Joined Dec 4, 2012 Messages 4,280 Helped 822 Reputation 1,654 Reaction score 791 Trophy points 1,393 Location Bangalore, India Activity points 0 The below lines are for UART initialization and should be placed before do{}while loop in the main() function. Code C - [expand]1 2 UART1_Init(9600); // Initialize UART module at 9600 bps Delay_ms(100); // Wait for UART module to stabiliz
The below lines are for UART initialization and should be placed before do{}while loop in the main() function. Code C - [expand]1 2 UART1_Init(9600); // Initialize UART module at 9600 bps Delay_ms(100); // Wait for UART module to stabiliz
Nov 17, 2013 #3 A ankiterect Newbie level 4 Joined Nov 16, 2013 Messages 6 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 41 jayanth now same problem is coming i have intialize my uart before the do while loop - - - Updated - - - i am thinking there are some clock frequency problem but i am not recorgnise completely please anyone help me
jayanth now same problem is coming i have intialize my uart before the do while loop - - - Updated - - - i am thinking there are some clock frequency problem but i am not recorgnise completely please anyone help me
Nov 17, 2013 #4 jayanth.devarayanadurga Banned Joined Dec 4, 2012 Messages 4,280 Helped 822 Reputation 1,654 Reaction score 791 Trophy points 1,393 Location Bangalore, India Activity points 0 Maybe Compiler is generating wrong baudrate. Change baudrate settings in Proteus and see if you get right output for any other baudrate. Before UART initialization code add Code C - [expand]1 TRISC = 0x80;
Maybe Compiler is generating wrong baudrate. Change baudrate settings in Proteus and see if you get right output for any other baudrate. Before UART initialization code add Code C - [expand]1 TRISC = 0x80;