I've been under the weather and we have also be doing some more construction around the MadLab, so not much opportunity to hack or post.
But - the MadLab patio/kitchen is looking _much_ better
Saturday, March 16, 2013
Friday, February 8, 2013
FM Radio (PIC12F1840) Using A TEA5767 or RDA5807P Module
UPDATE 13.0209:Here's some links for information about the RDA5807P and module:
RDA5807P Datasheet
Quick Info Sheet on a RDA5807P module. It does NOT look like the one I am using.
RDA5807 Programming Manual - unfortunately, it's in Chinese
And here's some links for the TEA5767:
TEA5767 Application Note
TEA5767 Datasheet
The RDA5807 can operate in native (RDA5807) mode or emulate the TEA5767. So the datasheet for the TEA5767 is a good source for registers and bits.
ORIGINAL POST:
Here's a quickie project using a PIC12F1840, an RDA5807P module (although a TEA5767 module could be used), a 2x16 I2C LCD module and an IR receiver. FM Radio! I haven't played around with all of the module settings yet - but I have power on, power off, scan up, scan down, mute, and toggling HLSI mode.
Thursday, January 17, 2013
Hacking An Atari Lynx
Update 13.0214:
My niece gave me a bunch of old PC boards, one being a ISA bus sound card. And - it had a 74LS245 on it, although not a DIP package. Well, that works for me - I wired it in to the design (instead of a 540) and only to /CE0. I will wire both /CE0 and /CE1 when I find a 74LS08. Well, I may be able to wiring in both using diodes, but I need to do some research.
The 74LS245 hot glued to the interface board and
blue wires attached to the 'B' side of the chip.
The 74LS245 fully wired into the design.
Success! This is T-Tris, running on the new setup.
So, with the 74LS245 incorporated, I don't have to do a bunch of weird 'bus switching' code in the PIC. It simplifies the code dramatically, which is needed. Next is to incorporate either the USB for reading game images from a thumb drive, or an SD Card slot. OR figure out how to increase the storage capacity of the PIC some other way (right now it's 32K bytes minus 256 bytes for code and 64 bytes for a header).
Games running so far:
1) Pong1K
2) Karri's PONG
3) Centipede
4) T-Tris
I still haven't managed to get the BLL loader working. BUT - I _can_ load either pure cart images, 'LYNX' header images (for emulators) and 'BS93' images (again, for emulators).
Update 13.0131:
New ROM Emulator schematics, V1.01 (5 pages). Now I need to find the parts - how am I going to find a 74LS540 and a 74LS08 around here? Time to scrounge at the local repair shops.
Update 13.0131:
I need to add a tri-state buffer to the data lines, that is enabled when either CE0/ or CE1/ go low. Right now the PIC drives the data lines continuously and this messes with the buttons - and who knows what else. There is a tristate (TRISD) for the data port (PORTD), but I can't switch it around fast enough to present the data to the Lynx. GRRRR. I have a timeout method for tri-stating the data port, but I'm unsure if I am messing up anything else in the system before it tri-states. GRRRRR. Oh well, what's a 20pin part amongst friends?
Update 13.0130:
Two things: a new Game Cartridge document and a schematic for a cartridge that will allow you to emulate whatever ROM you want, plus read ROM images from a USB thumb drive.
Note: The previous versions of the Game Cartridge document have been removed as they were flawed and presented incorrect information. There's enough bad information out there, I don't want to add to the confusion.
Also note: the ROM emulator hardware is not fully tested yet, not has all of the software been written. That will come in the future.
Here's the ROM emulator schematic V1.00 (5 pages):
And here's the new Game Cartridge document - V1.02 (10 pages):
Previous updates and the original post below the break.
Tuesday, December 25, 2012
BREAK OUT (PIC12F1840)
Since PONG was such a snap (heh) - why not do BREAK OUT for the PIC12F1840? Same hardware as the PONG game (you will have to turn the paddle sideways for left to right, instead of up to down). A lot of the infrastructure for the PONG game remains - just change the position / orientation of the paddle, change the graphics, and change the game play. Yeah, that's _all_ that needs to be done. Sure.
I've just started this today - I have the title screen changed and the paddle orientation complete. Working on the game play now. Nothing worth releasing the software yet. If you want to see what is basically in the guts of this game, go take a look at the PONG post HERE and check out the source code links.
UPDATE 12.1226:
The title screen, field, paddle and ball are done. Scoring and life counting is done. Wall collision and paddle collision detects are implemented. Loss of a life if you miss the ball is implemented. Video timings are (mostly) at spec. All I need to do now is put in the bricks!
UPDATE 12.1226:
I'm going to take the opportunity to try a new timing scheme I have been thinking about. Instead of timing the video lines throughout the code, I am going to let a TIMER0 interrupt service routine generate the video signals (except for actual data). This should be interesting.
UPDATE 12.1226:
It's possible to use the timer0 interrupt to time the video signals - for the most part I am getting a clean signal with no jitters - but some of the tweaking is AWFUL. I think what I actually have is a hybrid between using the ISR and the manual timing. More work to be done!
UPDATE 12.1227:
Using the timer0 interrupt has been fully implemented. Everything is working as before, but now all of the nasty 'Timing Fudge' (usually a bunch of NOPs) has been removed from the code. I can change the graphics now without having to go through and tweak each of the individual lines. This is _really_ nice. And the screen is rock solid.
I've just started this today - I have the title screen changed and the paddle orientation complete. Working on the game play now. Nothing worth releasing the software yet. If you want to see what is basically in the guts of this game, go take a look at the PONG post HERE and check out the source code links.
UPDATE 12.1226:
The title screen, field, paddle and ball are done. Scoring and life counting is done. Wall collision and paddle collision detects are implemented. Loss of a life if you miss the ball is implemented. Video timings are (mostly) at spec. All I need to do now is put in the bricks!
UPDATE 12.1226:
I'm going to take the opportunity to try a new timing scheme I have been thinking about. Instead of timing the video lines throughout the code, I am going to let a TIMER0 interrupt service routine generate the video signals (except for actual data). This should be interesting.
UPDATE 12.1226:
It's possible to use the timer0 interrupt to time the video signals - for the most part I am getting a clean signal with no jitters - but some of the tweaking is AWFUL. I think what I actually have is a hybrid between using the ISR and the manual timing. More work to be done!
UPDATE 12.1227:
Using the timer0 interrupt has been fully implemented. Everything is working as before, but now all of the nasty 'Timing Fudge' (usually a bunch of NOPs) has been removed from the code. I can change the graphics now without having to go through and tweak each of the individual lines. This is _really_ nice. And the screen is rock solid.
Subscribe to:
Posts (Atom)