Hi all,
If one know how to communicate between two PIC16f877A, so that on is master and the other is slave ?
Hi all,
If one know how to communicate between two PIC16f877A, so that on is master and the other is slave ?
Are you still working on your barcode reader to record the register of your students ?
You do not make it clear at all what you are hoping to achieve. It is theory that you would like, or practical help, or specific programming help. Which pins do you have available, have you any hardware resources available?
You could for example connect a single I/O pin on each PIC. On one PIC you designate (the slave) set the pin to input and on the other PIC (which is then the master) set the pin to output. Then on the slave you regularly keep check of the status of the pin (= 1 or =0 ) in your code, this, I believe, is referred to as POLLING. You can then communicate to the slave by changing the state of the output of the pin on the MASTER PIC.
I do become concerned that this forum, which is a limited resource, by virtue of the fact that its contributors provide their expertise for FREE, will lose the interest of its stock of extremely capable members who are prepared to answer our requests for help and assistance.
I also believe that language is not too much of a problem, as I do not doubt the sentiment of the previous reply.
If I were to undertake learning a complex, information based, subject that relied on me having to ask questions, I cannot begin to understand why I should want to further complicate my life by choosing to do so in a language I was not fully conversant in(unless I was forced to do so). I accept that microchip do not appear to provide datasheets in Italian of French etc, but there are auto-translators readily available now, sure they may make mistakes, but they help. I understand Melabs supplies PBP manuals in Spanish, for example.
To clarify I categorically do not believe that language difference is preclusive to understanding either PBP or, more importantly, to posting on this forum.
However, it is imperative, to at least attempt or be seen to attempt, to construct a well prepared question. I would assume that as a teacher, one has to keep one’s students motivated by such. Otherwise one’s students will become lazy and disinterested and therefore less capable to doing anything for themselves like reading books and spending time researching. They will gradually decrease initiative and begin to expect everything handed to them on a plate, eventually becoming truculent and facetious in attitude.
Microchip provide a range of documents entitled “Tips and Tricks” I suspect there may be something on their site to help evaluate and choose which of the options with respect to PIC to PIC communication that may be suitable. Microchip have a vested interest (ie they make money) in providing information regarding the use of their products to customers of all levels of ability.
Anyway observation for today is:
The quality of the answer is a function of the clarity of the question
HTH
Duncan
Thanks duncan303 for your feeling with me,
I'm untill now working on a project for queuing system , which have 18 digits of seven segment and PS/2 barcode reader and printer and serial eeproms and other buttons and LCD
The objective of this system is :
1- Student must insert his ID card in barcode reader to get his ID number
2- Microcontroller check its number and look for his information on serial eeprom
3- Microcontroller decide to print his information and serially number on a sheet of paper
4- Student must wait for his number untill it's display on seven segment
5- After that Employee give student the requested service and press on a button to take another number of student
I completed untill now the barcode and the printer stage but I think that the pins of PIC16f877a is not enough so I need another PIC so I worked on this stage.
Hi again
I was curious as to whether my choice of words might be understood
I also understand that it not actual programming that you need help on but the physical architecture of your proposed project for school, and that you may have run out of I/O pins. You could implement a port expander using a 74LS164 accessed serially that would give you 8 I/O's for every 2 used to control it.
You could consider making use of the hardware comms peripheral features that this chip has.
The difficulty is that your information is still far too vague, for me anyway. It would be useful to list which pins you have connected to what and how you are implementing your existing layout. And exactly what you want to add, ie I have three I/O pins left how can I add a 16 button keypad.
ie I have a printer connected to PORTA I have my LCD connected to PORTB I have my barcode reader connected to PORTC and my button connected to PORTD
Do you have a schematic you could post, or even a photo of your existing work in progress. Perhaps a photo of a quick pencil sketch, a picture speaks a thousand words in any language.
Duncan
Without any thinks I sure that this forum is the best forum I use it
Bookmarks