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.

Comments

  1. strider_mt2k says:

    Haven’t seen the word “Archer” on anything hacky in a while. Very cool!

    Extra credit for that alone. ;)

  2. Josh says:

    He needs to add some human reaction time delays to the paddles to make them look more realistic.

    Other than that, it’s pretty cool.

  3. AJ says:

    Damn you duck, you’re on the front page of hackaday

  4. steaky1212 says:

    i think that the project proves the usefullness of good ciruit practices

  5. Robert says:

    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….

  6. josh says:

    whaaaatt no arduino?!!

  7. CaitSith2 says:

    And here is yet another pong clock. http://www.ladyada.net/make/monochron/

  8. nutz4hs says:

    go duckie!

  9. Alan says:

    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.

  10. Alan says:

    … And yes, I do now realise I forgot to compliment (~) that C bit clearing method. Screwing up my interrupts in the process.

  11. Jesse says:

    @Alan: I just use

    T0IF = 0;

  12. AO says:

    Diggin’ the pong clocks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s