So, the coin switch must be down at least #C8 counts but less than #FF it
looks like.
Are you (Mark) just trying to make the input much less picky about timing?
Looks like if lower the #C8 to say #20, it will accept pulses much shorter..
fishd wrote:
>
> L0095: LD B,#E7 ;INT due to COINA or COINB
> L0097: IN A,(#F8) ;Check switch inputs, Active LOW
> AND D ;a = a .AND. /(initial input)
> JR NZ,#00A4 ;Don't JP if switch still pressed
>
> LD A,#A0 ;small delay
> L009E: DEC A
> JR NZ,#009E
> DJNZ #0097 ;keep looking for switch release
>
> DEC B ;Release Timeout, B = #FF
> L00A4: LD A,B ;switch released
> CP #C8 ;time the switch closure period
> JR NC,#00DA ;JP if timeout or period too short
>
> COINOK: CALL #010A ;period OK, CALL COIN_COUNTER_INCR
> LD BC,#04FB ;In_PORT = #FB, DIP switches
> LD L,#00
> LD E,L ;E & L = #00
> L00B2: IN A,(C)
> RRA ;Move DIP SW2-1 into E,b1
> RL E ;
> RRA
> RL L ;Move DIP SW2-5 into E,b0
> DEC C
> DJNZ #00B2 ;E(d3-d0) = SW2( 1,2,3,4 )
> LD A,L ;L(d3-d0) = SW2( 5,6,7,8 )
> CP E ;compare the two halves of the switch
> LD HL,#C80D
> JR Z,#00CB ;JP if SW2 positions identical
> BIT 7,D ;Complemented & Masked inputs, D7,6,5 of #F8
> JR NZ,#00CB ;D7 is COINA
>
> LD A,E ;SW2-1,2,3,4
> INC HL
> INC HL ;HL = #C80F
> .
> .
> .
>
> It goes on from here but that's the meat of it.
>
> David Fish | "We want...Information. INFORMATION
> Melrose, MA USA | You won't get it!
> fishd@tiac.net | By hook or by crook we will"
> dfish@bev.etn.com | _The Prisoner_
Received on Wed Sep 1 17:27:13 1999
This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:59 EDT