PICAXE 7 Segment LED Counter

August 17, 2013

You can drive a 7 segment LED from the PICAXE by making use of the CMOS 4026 Decade Counter. See http://drumcoder.co.uk/blog/2013/aug/12/7-segment-counting/ for how to set this up for a digit or two.

Next, connect an output from the PICAXE (I used C.4) to the clock input on the decade counter. In this way, when a pulse (on and off) is generated on C.4, the counter will increment by one.

I also had two LEDs on C.1 and C.2 which flashed each half second, with the counter incrementing each second.

main:
   call increment
   call flash
   goto main

flash:
  high C.1
  pause 50
  low C.1
  pause 450
  high C.2
  pause 50
  low C.2
  pause 450
  return

increment:
  high C.4
  low C.4
  return