[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.
Haven’t seen the word “Archer” on anything hacky in a while. Very cool!
Extra credit for that alone. ;)
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.
Damn you duck, you’re on the front page of hackaday
i think that the project proves the usefullness of good ciruit practices
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….
whaaaatt no arduino?!!
And here is yet another pong clock. http://www.ladyada.net/make/monochron/
go duckie!
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.
… And yes, I do now realise I forgot to compliment (~) that C bit clearing method. Screwing up my interrupts in the process.
@Alan: I just use
T0IF = 0;
Diggin’ the pong clocks!