![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
hi all... i need to transmit bits from pc to pic... i dont know how to start apart from this code i got hold of Code: #include <p18C452.h>
#include <usart.h>
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(1)
{
while( ! PORTAbits.RA0 ); //wait for RA0 high
WriteUSART( PORTD ); //write value of PORTD
if(PORTD == 0x80) // check for termination
break; // value
}
CloseUSART();
}
so here's the order hyperterminal > rs232/rs485 converter > rs485 > pic... | |
| |
| | #2 |
|
sorry about the title... my mistake.. uart receiving... =)
| |
| |
|
| Tags |
| transmitting, uart |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Problem with MpLab :programming UArt for transmitting data.... | fermat7 | Micro Controllers | 8 | 19th April 2009 05:51 PM |
| Transmitting tree's ? | Mercur | General Electronics Chat | 19 | 23rd February 2009 01:52 AM |
| Increasing transmitting range? | wikisi | General Electronics Chat | 4 | 21st February 2009 04:44 PM |
| UART Transmitting Problem | winson | Micro Controllers | 9 | 20th January 2009 03:01 AM |
| Maximum transmitting distance | mstechca | Electronic Projects Design/Ideas/Reviews | 7 | 4th September 2005 02:30 PM |