Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Just another PIC to serial port question.

Status
Not open for further replies.

GatorGuy

New Member
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 said:
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.
 
GatorGuy said:
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top