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.

pic16f84A

Status
Not open for further replies.

buzz RG

New Member
How can I connect these LEDs and switches to PIC 16F84A ? I need to have PIC to PIC communication and the programing has to be in assembly using (MPLAB.) and then use(( proteus))
Screenshot (81).png
 
I would suggest strating by writing the software to create a software UART ast the PIC17F84A does not have a hardwate UART. (You will probably find may examples of this on the web.) You can then use two pins on each PIC to communicate between the PICs I would decide to use one as master and the other as a slave. (The master would make all of the decisions. Based on the 5 switches.) As you have 8 data bits available you can use 4 to control the LEDs and either 2 or 3 bits (Depending on which one is master.) to send the state of the switches. I have just realised that you are allowed to use multiple lines to communicate so if Z was the master you could do it with 6 lines of the B port. In fact if you use one line per switch from PIC Y then the output of the switches could just be linked beteen the pics rather then using another two ports.

Les.
 
Last edited:
I did one of these years back.... 8 digital and 8 analogue multiplexed down RS485 for 100 metres.... Worked pretty good.. I still think its working today!!!

There are examples to do this on Nigel's site... Depending on distance, I would agree with Les... Software RS232...
 
Your hardware simulation in proteus would look something like below. I left out the oscillator part and I am not sure if RB6/7 is suitable for the soft uart. Please check the datasheet to confirm.

F84 PIC-PIC COMMUNICATION.PNG
Allen
 
This looks like a school project. It will not help you if someone else does all the work. You need to back over what you have been tought as it seems obvious that you have not learned it. You have been given lots of hints about how to proceed. When you leave school and start work you will not be able to get someone else to do your job for you.

Les.
 
thanks absf that is so helpful
can u help me with the coding
if u may on MPlab

Sorry, as other members have indicated..... That is, unless you show some efforts on your part first, more help would be given to you free.:happy:

Perhaps you can start with a Flow-Chart of your coding.

Allen
 
Last edited:
the thing is its a project at collage and there is gana be exam in two days
and the doc he is just gana ask about it
and he gave as nothing about the programs
and am weak in assembly language .
so i need help to pass the exam
and i hope u give help . :)
 
and am weak in assembly language .
so i need help to pass the exam
Here in lies the problem.... If you pass but it wasn't your work, you will be living a lie..

Way back when... I was given projects... I managed to do them in more than ample time... We had students who still hadn't started days before time was up... Guess what!!... They failed...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top