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

How to multiplex 4x7segments with switches by using timer interrupt.

I am using AT89c2051 to multiplex 4x7 segments by configuring P3 as buffer for segments and P1.0~P1.3 as control bits for segments,two switches also connected at P3.0 and P3.1, I used the timer interrupt for multiplexing but i failed to use switches because thats are connected at same port which is being used for buffer for segments.Can anyone tell me how to use switches when using timer interrupt.

Parents
  • i failed to use switches because thats are connected at same port which is being used for buffer for segments
    I guess that the above means that you need to do this

    instead of "do to P3"
    "do to P3shadow"
    mov p3,P3shadow

    another method would be
    anl P3,# mask for bits not to be changed
    orl P3,# bits to be changed
    Erik

Reply
  • i failed to use switches because thats are connected at same port which is being used for buffer for segments
    I guess that the above means that you need to do this

    instead of "do to P3"
    "do to P3shadow"
    mov p3,P3shadow

    another method would be
    anl P3,# mask for bits not to be changed
    orl P3,# bits to be changed
    Erik

Children