Comunication between PIC16f877A and PIC16f877A ?


Closed Thread
Results 1 to 10 of 10
  1. #1

    Question Comunication between PIC16f877A and PIC16f877A ?

    Hi all,
    If one know how to communicate between two PIC16f877A, so that on is master and the other is slave ?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    Hi all,
    If one know how to communicate between two PIC16f877A, so that on is master and the other is slave ?
    Using the 2 words PIC and COMMUNICATE and clicking SEARCH, gives me 11 pages worth of hits here.
    What's wrong with the search function at your end?

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks for your professional solution

  4. #4
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    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

  5. #5


    Did you find this post helpful? Yes | No

    Lightbulb

    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.

  6. #6
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    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

  7. #7


    Did you find this post helpful? Yes | No

    Lightbulb

    thanks again for your gold idea 74LS164 which expanding our ports and not to need another PIC .
    oky here is the pins and ports are used
    - I use portc as data port for printer
    - I use RB0 and RB1 for barcode one for clock and other for data
    - I use RB3 for busy signal of printer
    - I use RB2 for strobe signal of printer
    - I use RB4,RB5,RB6 as buttons for registration and financial and cancel for student select

    here is what used for the first stage
    second stage I will control of 18 seven segments and need also 6 buttons for employes and one pin for indication sound

    But I have a strange problem when I add in some way an addition code in our programm , I notice that the intrrupt is not working well

    here is the code I added in the begining of our programm
    ;;;;;;;;;; check the availability of printer
    lcdout ins,clr,ins,line1,"Check Printer...."
    if busy=1 then
    while busy=1
    LCDout ins,line2,"Printer Problem"
    wend
    endif

    LCDout ins,line2,"Printer Online"
    pause 2000

    lcdout Ins,clr,INS,Line1,"Please Ins. ID card"
    ;;;;;;;;;;;;;;;;;;;;;;;;;
    I don't know what is the problem ???????????

  8. #8
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    so you have PORTA and PORTD completely free?

    why exactly have you run out of I/O's

    shortly about to leave to catch "the learning curve" by Libby Purves on Radio 4, tonight has a piece about the government OFSTED inspections that are due very soon, do you have the same sort of thing?

    Duncan

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    Thanks for your professional solution
    The quality of my answer is in direct proportion to the initial effort investment.

    Try to tell me there isn't a decent handful of examples already here on this site?

  10. #10


    Did you find this post helpful? Yes | No

    Talking

    Without any thinks I sure that this forum is the best forum I use it

Similar Threads

  1. PIC16F877A for application in mobile robot...
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th January 2009, 15:47
  2. Replies: 11
    Last Post: - 6th November 2008, 11:27
  3. problem with pic16f877a !!!
    By ibra in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 14th December 2007, 07:38
  4. communicating pic18f452 with pic16f877a
    By tamersoss in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th July 2007, 20:54
  5. PIC16f877-20 to a PIC16f877A I/P Disaster
    By andyf in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 21st November 2005, 18:11

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts