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 26th June 2005, 10:05 AM   #1
Default Just another PIC to serial port question.

Everyone here has told me to use the USART to connect to the serial port. So far that seems to be the best solution for what we want to do. I have seen someone else do the same thing connecting the ground and one output pin from the serial port to the PIC. What I need is some really simple assembly examples of how to "listen" for data to arrive from the serial port. Let’s say I need PORTA, 4 high and I wanted the command from my software to be A4H. How would you write the assembly program to listen for data, match it, and run a sub?

Also I stated another thread about linking several pics to a master pic. Would it be possible to just have several pics connected in parallel to the same outputs of the serial port and program each pic with different commands? Like PICa, PICb, PICc. Taking the examples above I would send "PICaA4H" for PIC A to send PORTA, 4 High. I'm sorry if this isn’t very clear. I have had one long week. Thank you everyone for the help on this.


-C
GatorGuy is offline  
Old 26th June 2005, 10:23 AM   #2
Default Re: Just another PIC to serial port question.

Quote:
Originally Posted by GatorGuy
Everyone here has told me to use the USART to connect to the serial port. So far that seems to be the best solution for what we want to do. I have seen someone else do the same thing connecting the ground and one output pin from the serial port to the PIC. What I need is some really simple assembly examples of how to "listen" for data to arrive from the serial port. Let’s say I need PORTA, 4 high and I wanted the command from my software to be A4H. How would you write the assembly program to listen for data, match it, and run a sub?

Also I stated another thread about linking several pics to a master pic. Would it be possible to just have several pics connected in parallel to the same outputs of the serial port and program each pic with different commands? Like PICa, PICb, PICc. Taking the examples above I would send "PICaA4H" for PIC A to send PORTA, 4 High. I'm sorry if this isn’t very clear. I have had one long week. Thank you everyone for the help on this.


-C
1. That thing is Called Software USART, I preffer to use HW USART. Why would you like to use SW USART if your PIC has HW USART?

2. That Paralel combination WOULD work, except for sending data from PICs to the PC.
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Old 26th June 2005, 11:26 AM   #3
Default Re: Just another PIC to serial port question.

Quote:
Originally Posted by GatorGuy
Everyone here has told me to use the USART to connect to the serial port. So far that seems to be the best solution for what we want to do. I have seen someone else do the same thing connecting the ground and one output pin from the serial port to the PIC. What I need is some really simple assembly examples of how to "listen" for data to arrive from the serial port. Let’s say I need PORTA, 4 high and I wanted the command from my software to be A4H. How would you write the assembly program to listen for data, match it, and run a sub?
Try checking my tutorials, where I give both hardware and software serial examples.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Reply

Tags
pic, port, question, serial

Thread Tools
Display Modes




All times are GMT. The time now is 02:38 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker