The 16F84 is a physically larger chip and it requires an external oscillator. The 12C508 by itself is more than capable of doing this task, so I wouldn't discard it. Besides, I've got a rail of 508's left over from my PS1 modchip days so I'm determined to prove the chip is usable
To do the T0CKI thing, You don't have to change the code necessarily... almost all of it can stay the same. Instead of using a BTFSx function to sample the interrupt line directly, check TMR0 to see if it isn't zero (a pulse was counted). Then clear the register immediately afterwards.
example code:
//// old code
BTFSC GPIO,x
CALL branch
//// new code
MOVF TMR0,1
BTFSS STATUS, ZERO
CALL branch
<other stuff>
branch: CLRF TMR0
<other stuff>
Or alternate software idea: the V12_DEAD_BEEF shows the interrupt running at 50Hz. You could probably run a simple wait/check/wait/check routine in the PIC at 30Hz which checks the TMR0 register value (then clears it afterwards)
- If the timer register holds 1 or 2, everything's fine.
- If it's 0, mechacon crash, mute the RS2004.
- If it's something high like 10, then something's obviously wrong with the mechacon, mute the RS2004.
I think it's simpler
I think i'll rewrite the software for this, just for fun. One feature I think I'll add is the ability to connect a red/green bicolor LED across the two unused GPIO pins for a status LED. This way, depending on the faint glow you see within your pstwo you know wether you've got a mechacon crash or not.


LinkBack URL
About LinkBacks






