Flashing light display

mark Easterling

New Member
I am using a 08m2 circuit diagram attached. When I down load the code, only pin 7 C.0 flash on and off. I even tried just turning all outputs on and still only pin 7 C.0 came on then off and repeated?

init: let dirs = %00110111
main:
label0:
if Input3 is On then label1
goto label0
label1:
tune 3, 10, ($7C,$41,$43,$43,$43,$43,$41,$41,$41,$41,$44,$44,$44,$44,$43,$43,$43,$41,$43,$43,$43,$43,$41,$41,$41,$41,$44,$44,$44,$44,$43,$42,$41,$51,$10,$48,$46,$37)
Switch on 4
Switch off 2
Switch on 1
Switch on 0
pause 200
Switch off 4
Switch off 2
Switch off 1
Switch off 0
pause 200
Switch on 4
Switch off 2
Switch on 1
Switch on 0
pause 200
Switch off 4
Switch off 2
Switch off 1
Switch off 0
pause 200
goto label0
 

piclt

Member
Your Switch off 2 is only always off....you have no Switch on 2
tune 3 for 08M2 is LED option to flash C.0 and C.4
C.2 is always the tune out....I think it works OK on the simulator
 

bpowell

Senior Member
I don't see a circuit diagram attached.

I'd like to see a high-resolution picture of your bread-board; so I can clearly see the connections.

The Tune command you've issued tells the 08M2 to play the notes you provided, and the flash C0 and C4 alternately... after the tune is done playing, the other routines blink LEDs as you'd expect.

The tune should be playing on PIN C.2 ... so you don't want to be giving that same port switch-on / off commands in the rest of your code ... (I see you're just switching it off ... but still, I'd remove those lines)

Your code works as I'd expect in the simulator.
 

Technical

Technical Support
Staff member
Most likely your PICAXE chip is resetting because the minimum operating circuit (10k/22k) is not correctly attached. Look up the minimum operating circuit in part 1 of the manual. The flashes on C.0 are not the downloaded program at all, it is the PICAXE chip resetting and attempting computer connection.
 

mark Easterling

New Member
The circuit works now with the tune on C.2 but will not work on the circuit. Only led's flash on and off on C.0. Which should not happen. I am not sure about the comments above. I have a 10k pulling down on C.5 (serial in) as I am using a programmer board.
I will try it on a bread board and see if it works?
 

piclt

Member
Break your "Big" problem down into several small problems..... "Stepwise Refinement"
Only have pins C.1 and C.2 in the part that is series of switch on/off....comment out the C.0 and C.4 lines
Sort out the on/off sequence for C.1 and C.2. and tune on C.2
When you run it in simulator you will see separately the 2 parts of the program working, C.0 and C.4 will flash as tune plays, and C.1 and C.2 will flash while the tune is not playing and whole thing keeps repeating.
Get it working on breadboard, then make sure PCB is wired same
 
Top