sarathsnairpoonjar
Member level 2
- Joined
- Nov 12, 2012
- Messages
- 50
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,288
- Location
- Cochin,Kerala,India
- Activity points
- 1,560
You have only initailized UART with 9600 baud. Where is the UART1_Read(), UART1_Read_Text(), UART1_Write(), or UART1_Write_Text() function?
What is your clock frequency? You have to Set comparator register properly. Actually you have to disable the comparators because they are connected to RA0 and RA1 pins.
yeah i initially set like that but when i give a 1000 ms delay it will give a 10 - 15 seconds of delay.then i changed the osccon register and loaded with 0x72 the the delay was almost correctOn your keyboard, press Ctrl + Shift + E. At the top of the window that pops up, you have "Oscillator Selection", select INTOSC.
Hopet this helps.
Tahmid.
What change are you expecting without sending are receiving any data?
You have only initailized UART with 9600 baud. Where is the UART1_Read(), UART1_Read_Text(), UART1_Write(), or UART1_Write_Text() function?
What is your clock frequency? You have to Set comparator register properly. Actually you have to disable the comparators because they are connected to RA0 and RA1 pins.
You have only initailized UART with 9600 baud. Where is the UART1_Read(), UART1_Read_Text(), UART1_Write(), or UART1_Write_Text() function?
What is your clock frequency? You have to Set comparator register properly. Actually you have to disable the comparators because they are connected to RA0 and RA1 pins.
read my last post, it is updated. I don't know about writing to TXREG. I use UART Library functions in mikroC Pro. Are you sure writing a byte to TXREG will transmit the byte to Virtual Terminal?
See this link http://saeedsolutions.blogspot.in/2012/11/pic16f877-uart-code-proteus-simulation.html
Can you show me these registers in datasheet? mention the page nos.
TXCKSEL_bit=1;
RXDTSEL_bit=1;
CPSON_bit=0;
it is not working.but when i tried to toggle a port pin it workedYou can easily make use of the mikroC PRO for PIC UART Library:
http://www.mikroe.com/esupport/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=157
http://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/uart_library.htm
What? You reposted your last post. Have you pulled-up MCLR pin to Vcc? If not, do it. Can you post your circuit?
i tried with uart1_write('*');I saw about that registers. you are sending 0x01 to TXREG. See ASCII table 0x01 means SOH. Maybe it doesn't have a character. Try sending 48 decimal or 0x30. You should get character 0 on hyperterminal/proteus virtual terminal.
Also try UART1_Write('A'); and see if it outputs character A.
Also try setting TRISA0_bit = 1; and TRISA1_bit = 1;
Did you select internal oscillator in the configuration settings? Do select it. Then, set the frequency of operation using the OSCCON register and the OSCTUNE register.
OK. i got the output properly but using external oscillator. The problem is with Internal oscillator for sure. I will try to solve.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?