This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Programable relationship between pins

Dear members,

I have the following problem: I need that the state of some pins of an 8051 being a logical function of the state of other pins. The difficult is that the logical function must be programmable.
For example: I need that logical state of pin P1.0 must be a logical function of pins P1.1 and P1.2 and the logical functions could be "AND", "OR", or "XOR". I am using an AT89S8252 with 2K of internal EEPROM.
I need some advice, tips, ideas, etc. about how to implement this.
Thanks in advance for your help.

best regards,
JLR
(rodribaires@hotmail.com)

Parents
  • Dear Drew,

    Thanks for your point, I see that the original post is a bit confusing, I need to implement some sort of PLC, so the user downloads the relationships to the uC using the serial port, the user could change the relationships any time. I am starting with pin relationships, but I also need to add relationships with counters, like P3.2 = (P3.1 & (counter > 0x7F))
    I am using C as programming language, so I am looking for ideas about how to implement this, i.e: how to store the relationship, how to evaluate the relationship, etc.

    cheers,
    JLR

Reply
  • Dear Drew,

    Thanks for your point, I see that the original post is a bit confusing, I need to implement some sort of PLC, so the user downloads the relationships to the uC using the serial port, the user could change the relationships any time. I am starting with pin relationships, but I also need to add relationships with counters, like P3.2 = (P3.1 & (counter > 0x7F))
    I am using C as programming language, so I am looking for ideas about how to implement this, i.e: how to store the relationship, how to evaluate the relationship, etc.

    cheers,
    JLR

Children
No data