Dan_lay
- 29th October 2007, 13:28
I have a simple program that listens on a port for serial commands using SERIN. It then activates one of 8 relays depending on the serial input.
I need my PIC (currently a 16F84) to also be running another part of the program at the same time. (Ideal) However it seems that when my program reaches a SERIN command it just sits there, the whole program pauses and waits for data.
I now need my pic to also be counting away in the background and activate a relay after a duration of no serial activity. I know PICs are not multithreaded (well atleast the 16F84).
Is there a more advanced PIC that can do this? Ideally I need a solution that can fit into a 18Pin DIL.
My question at this stage is, is it possible with an adjustment to my existing pbp code? If so, does anyone know of a working example of this kind of thing practice.
Many Thanks,
Dan
I need my PIC (currently a 16F84) to also be running another part of the program at the same time. (Ideal) However it seems that when my program reaches a SERIN command it just sits there, the whole program pauses and waits for data.
I now need my pic to also be counting away in the background and activate a relay after a duration of no serial activity. I know PICs are not multithreaded (well atleast the 16F84).
Is there a more advanced PIC that can do this? Ideally I need a solution that can fit into a 18Pin DIL.
My question at this stage is, is it possible with an adjustment to my existing pbp code? If so, does anyone know of a working example of this kind of thing practice.
Many Thanks,
Dan