PIC Pong Clock

[Andrew] built this pong clock over the span of a couple of days. The PIC 18f2520 he used can serve as a real time clock with the addition of an external clock crystal. His project proves the usefulness of an oscilloscope as poor board layout caused interference in the crystal connections, something difficult to troubleshoot without this handy lab tool.

Pong clocks have been quite popular. This one is nice because it’s easy to throw together now that [Andrew’s] done the coding work for you. Written in assembly, reading and understanding his code might be a good exercise if your low-level language skills are lacking.

12 thoughts on “PIC Pong Clock

  1. Damn, player 2 kicks ass!! Player 1, you suck, you rarely ever score! Go back to pong school!

    Looks very nice. reminds me of some of the programming ideas I did on my TI. Those were the days….

  2. Until this week I’ve always programmed PICs in assembler, but I’ve started using C via the HI-TECH assembler in the 45-day pro-demo. It’s very intuitive – as in nice definitions in the header – and makes very small binaries. Free mode – without the omniscient code generation – is the opposite.

    I particularly like the assembler embedding to do bitwise operations:
    #asm
    bcf 0x0b, 2
    #end asm

    rather than:
    INTCON &= (1 << 2);

    Although in this example the pro mode HI-TECH compiler spots what I'm trying to do and boils over 10 instructions down to just the 1.

    It's a shame it's so expensive, I really would like an intuitive, efficient and free C compiler for PIC16 MCUs.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.