Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 5th June 2009, 03:59 AM   #1
Default possible for uart receiving?

is this code possible for uart receiving?

Code:
#include <p18C452.h>
#include <usart.h>

char readUSART(void);
char firstCh;
char nextCh;

void main(void){


	// configure USART
  OpenUSART( USART_TX_INT_OFF  &
             USART_RX_INT_OFF  &
             USART_ASYNCH_MODE &
             USART_EIGHT_BIT   &
             USART_CONT_RX     &
             USART_BRGH_HIGH,25);

 

 while (!DataRdyUSART()) 
{
firstCh = ReadUSART();
}

	while (!DataRdyUSART())
	{
	nextCh = ReadUSART();
 	} 	

}

but when i tested it out, theres a signal coming out from the TX pin... strangely... and how do i make it so that when a data is transmitted via hyperterminal, a LED would light up?
im using c18 compiler with pic18f452...
butters is offline  
Reply

Tags
receiving, uart

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
problem in uart receiving (correction) butters Micro Controllers 5 4th June 2009 10:37 AM
USART/UART data receiving problem mbarren Micro Controllers 32 28th May 2009 01:24 AM
Receiving either RS-232 or RS-485 DSGarcia Micro Controllers 5 24th October 2008 12:29 AM
After receiving the signal lowkb General Electronics Chat 1 8th February 2006 05:16 AM
Receiving Data GatorGuy Micro Controllers 9 15th July 2005 08:49 AM



All times are GMT. The time now is 04:29 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker