Hello
I am trying to make a very simple pulse generator with a PIC (12f1840 )
I am trying to get two 30 microsecond pulse's out at same time,
one is normal , the other is inverted on two separate pins at same time
my code for the two pulses, can the command be written on same line
PulseOut PORTA.1, 30 us : PulseOutInv PORTA.2, 30 us
will this give pulses out on seperate pins or should I use the set and wait commnds ? thanks
Last edit: rowdy 2020-07-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have been in stage 4 china virus lock down for weeks, including a night time curfew, its a real pain, anyhow after testing if you put PulseOut PORTA.1, 30 us : PulseOutInv PORTA.2, 30 us, ether in the same line or on line below, the second inverted pusle happens AFTER the first pulse, , but if you use the SET on and off on same line the two pulses happen at same time no delay, thanks Stan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I am trying to make a very simple pulse generator with a PIC (12f1840 )
I am trying to get two 30 microsecond pulse's out at same time,
one is normal , the other is inverted on two separate pins at same time
my code for the two pulses, can the command be written on same line
PulseOut PORTA.1, 30 us : PulseOutInv PORTA.2, 30 us
will this give pulses out on seperate pins or should I use the set and wait commnds ? thanks
Last edit: rowdy 2020-07-23
Seems to work.
Increase the pulseout and pulseoutinv to longer time and you can see pulseout is like wait ie stop program flow until finished
Your set port.x on offgives more simultaneous results
This does not work
Thanks I will report back
We have been in stage 4 china virus lock down for weeks, including a night time curfew, its a real pain, anyhow after testing if you put PulseOut PORTA.1, 30 us : PulseOutInv PORTA.2, 30 us, ether in the same line or on line below, the second inverted pusle happens AFTER the first pulse, , but if you use the SET on and off on same line the two pulses happen at same time no delay, thanks Stan