74LS193 to BS2
Archiver
Posts: 46,084
Mark-
Unless there's more code you're not showing, looks to me like you
never set I/O's 0, 1, 2 and 3 to output mode, hence setting OUTA to
whatever asserts nothing on those pins. Maybe set up all your DIRS
at start of program, or at least add:
dira = %1111
Regards,
Steve
On 27 May 01 at 19:34, auto106947@h... wrote:
> Hi all,
>
> Anyone got any tips as to why my code here won't count?
>
> Keep getting zero...
Unless there's more code you're not showing, looks to me like you
never set I/O's 0, 1, 2 and 3 to output mode, hence setting OUTA to
whatever asserts nothing on those pins. Maybe set up all your DIRS
at start of program, or at least add:
dira = %1111
Regards,
Steve
On 27 May 01 at 19:34, auto106947@h... wrote:
> Hi all,
>
> Anyone got any tips as to why my code here won't count?
>
> Keep getting zero...
Comments
Anyone got any tips as to why my code here won't count?
Keep getting zero.
TIA,
Mark
'Count with 74LS193 and BS2
cntr var word
'clear '193
dir4 = 1 'set it up to pulsout high.
pulsout 4, 1000 '10k pullup resistor to +5v and BS2 pins 4 & 5
'and 11 Load and 14 Clr on the '193
'set data lines up with count by 13, %1101 is 13
outa = %1101
'load data into '193
out5 = in5 'set it up to pulsout low.
pulsout 5, 1000
pause 100
'start counting pulses, pulses are 25usec low true.
count 6, 1000, cntr
debug "count = ", dec cntr, cr
end