hi,
i compile the additional example of yours into my codes and it works ok but at the toggle part dint works well.
attached is the simulation using the real pic simulation named result:
as you can see i want it to be the pin rc3 should be high and pin rc0 should be low at 1 cycle but result show both of pin is high.
i try to change the code a bit into: ( for phase 1 only)
it end like attached file name result2.Code:ChangeBridgeDrive: ' When we come here the value i contains the phase counter that just got reset so we ' can use that to determine for which phase we should switch the outputs. Select Case i Case 0 ' It was Phase 1 that rolled over High PORTC.3 ' Invert the state of the pin Low PORTC.0 ' Invert the state of the pin Toggle PORTC.3 Toggle PORTC.0
yes im also worried about the shoot thru in the beginning but then i realise time
between each cycle to launch is about 1.8ms, so it should be enough time before it collide each others.
please help advice the code.
photoelectric
please help advice.




Bookmarks