Bad AIWA shelf top CPU
My wife's AIWA shelftop system died the other day and of course I took it apart to see what was wrong.
It appears to me that all circuits are working correctly, except the NEC UPD780226GF IC which is essentially an 8-bit microcomputer with a 78K ROM.
Now if I ordered this chip from NEC I would still have to flash the ROM with the AIWA control code for that model correct? So ordering the CPU is going to do nothing. I've downloaded a data sheet which also states the package comes with an in-circuit debugger, a C compiler, an assembler, linker, and librarian.
But even though I could figure out how to program the beastie, I do not know what the AIWA system expects to see.
So I guess I'm out 150 bucks eh? Seems I could probably do embedded C and assembly for these types of devices with little or no trouble at all. Maybe I'm in the wrong biz.
> I would still have to flash the ROM with the AIWA control code for that model correct?
Getting that 78K's worth of info could be tricky if the device is already dead. Even if it weren't, some devices resist simple copying.
Writing your own version might be possible if you'd had chance to observe the system functioning over a period of time. I'm taking a guess that the ROM contains lots of bitmaps for the graphical displays, so maybe it doesn't have to do much at all to convince the rest of the system that it's working normally.
If you can manage the chip replacement, try a few "wanted" ads for other broken AIWAs of the same kind, and hope they failed for some other reason. Then simply reclaim the chip.
Well it's not actually a true LCD. It has sections of lights that simply light up to produce the final image. Given the instruction set of the processor is quite small and given the tasks it has to perform are about a hundred times less complex than what I'm used to, I could probably code the thing.
But I don't know what ports the AIWA is hooked up to and although using the data sheet I can read the IC pinout....I'm still stuck. This embedded C and assembly though is quite interesting to me. Hell if I can do x86 32-bit assembly, this stuff is cake. It does have 16-bit instructions but it seems this certain chip only uses 8 bit. It seems the only explicit register is AX according to the data sheet. The instruction set is simple, memory map is simple, and it only has 12 interrupts. 12! I'm used to 255. It does have hardware maskable interrupts, I assume to respond to devices at any time and it only runs at 5 MHz. Maybe I've been looking at the wrong type of programming Salem. Perhaps embedded is something I could get into b/c this stuff seems to be quite simple given even the modern NEC IC's are only 16 bit and given my love for assembly and C.
And I can read the entire datasheet for the most part and it's not Greek to me. That is really scary. Most of the assembly language concepts I've learned through the years are present all over this datasheet. Quite an eye-opening experience. I guess once you learn assembly for the most part you could probably program a coffee maker if it uses an IC.
****Shhhhhh**** you'll let everyone know how easy it is ;)
I'm sure you'd have no trouble writing programs for the device given your experience.
As you say, it's how that particular device is supposed to interact with the rest of the system which will be tough to figure out. Various inputs will arrive on various pins, and something will expect a response in a certain time before the something else decides the device isn't working.
You really need the circuit diagram for the AIWA (usually only obtainable by service personnel) to make more progress. I once managed to get that info for an old NEC TV by asking nicely at some local electrical repair shop. If you have a local repair place, maybe they could help you out (or maybe www.manualsparadise.com - didn't find a free one time time)
> I guess once you learn assembly for the most part you could probably program a coffee maker if it uses an IC.
Pretty much. It's all just input-process-output.
If you know the algorithms, then the language don't matter.
If you're pretty good with portable C, then the compiler doesn't matter.
Once you've learnt a couple of assemblers for different processors, they all start to look the same.