Jack Burns
New Member
Pulsout is NOT working as expected on a 40X2.
I have discovered it causes more than one pin to change state at the same time, but only under certain conditions.
Looking at the waveforms below, the 'RS' line should NOT be pulsing, however when it's set high (high RS) then any pulsing on the 'EN' line causes 'RS' to change state at the same time. However, when RS is set low (low RS), then pulsing 'EN' has no effect on RS (which is the correct behaviour).
I'm not looking for a solution as using high/low commands or toggle on 'EN' seems to work correctly on the main project, however I would like to know if this a known problem with pulsout?
PICAXE Editor 6.1.0.0
40x2 Firmware vB.3
40X2 Compiler v3.4
Regards
Jack
Here is some test code used to generate the waveforms.
I have discovered it causes more than one pin to change state at the same time, but only under certain conditions.
Looking at the waveforms below, the 'RS' line should NOT be pulsing, however when it's set high (high RS) then any pulsing on the 'EN' line causes 'RS' to change state at the same time. However, when RS is set low (low RS), then pulsing 'EN' has no effect on RS (which is the correct behaviour).
I'm not looking for a solution as using high/low commands or toggle on 'EN' seems to work correctly on the main project, however I would like to know if this a known problem with pulsout?
PICAXE Editor 6.1.0.0
40x2 Firmware vB.3
40X2 Compiler v3.4
Regards
Jack
Here is some test code used to generate the waveforms.
Rich (BB code):
#REM
CODE TO DEMONSTARTE PROBLEM WITH RS LINE CHANGING STATE WHEN IT SHOULDN'T.
==========================================================================
Problem occurs with 'RS' normally high and 'EN' normally low. Pulsing 'EN'
high causes 'RS' to go low for the length of the pulse on 'EN'.
This should NOT happen.
40x2 Firmware vB.3
40X2 Compiler v3.4
PICAXE Editor 6.1.0.0
#ENDREM
#picaxe 40x2
#no_table
symbol RS = A.7
symbol EN = A.6
low EN
; SEND PULSES USING PULSOUT
low RS
gosub sendPulse ' Works correct with RS low
high RS
gosub sendPulse ' PROBLEM WITH RS, SHOULD STAY HIGH.
low RS
gosub sendPulse ' Works correct with RS low
do : loop
end
sendPulse:
for b0 = 1 to 10
pulsout EN,100
pause 10
next b0
return