Hi all,
I'm currently working on a project where I would like to be able to turn on and off individual pins across different ports of a P18F. Ideally, I would like to be able to tell one pin to go high for x amount of time, but also control other pins whilst that pin is still high.
I've drawn this little sketch to try to show what I mean.
Basically, is there a way to get the pic to 'keep track' of where, say, the a0 time is at, whilst still being able to switch b2, and c1? It seems to me that if the delay is running for a0, it can't continue whilst I set b2 high. Of course, this is with my limited knowledge, just curious if there is a way to do it.
I could set shorter delays for a0, until I need to turn b2 on, but that starts to make things a bit more confusing.
Anyhow, thanks for your time. I realise that I have perhaps not explained my thinking very well, but if it is too confusing, please say, and I will do my best to rethink.
Best regards,
Sparky
I'm currently working on a project where I would like to be able to turn on and off individual pins across different ports of a P18F. Ideally, I would like to be able to tell one pin to go high for x amount of time, but also control other pins whilst that pin is still high.
I've drawn this little sketch to try to show what I mean.
Basically, is there a way to get the pic to 'keep track' of where, say, the a0 time is at, whilst still being able to switch b2, and c1? It seems to me that if the delay is running for a0, it can't continue whilst I set b2 high. Of course, this is with my limited knowledge, just curious if there is a way to do it.
I could set shorter delays for a0, until I need to turn b2 on, but that starts to make things a bit more confusing.
Anyhow, thanks for your time. I realise that I have perhaps not explained my thinking very well, but if it is too confusing, please say, and I will do my best to rethink.
Best regards,
Sparky
Attachments
-
24.7 KB Views: 58