Friday, December 21, 2012

Chinese Meteor Lights (8 Pin Micro, 18 LEDs)

UPDATE 12.1222:
 As an experiment, I wired up their 8-pin part to a ICSP header and connected it to a PICKIT2. Well, it's not a 12F629 - in fact, the PICKIT2 reads back an ID of '0', which I think means the device isn't responding back properly. Anyone out there know what Microchip device has an ID of '0', if any?

So it's not a Microchip PIC - probably. It could be some other micro, or a specialty part as I said before. BUT, the important thing is that a PIC12F629 _can_ work in the design. And that gives me 20 individual LEDs on an 8-pin PIC with no additional hardware. And that makes me _really_ happy. Just think of the upgraded 'Iron Man Chest Arc Reactor' I can build now!

-----
Okay, I revisited the Chinese Meteor Lights with 18 LEDs that has an 8 pin device controlling the LEDs. At first it was thought that the device was an 8-pin micro of some sort, maybe a PIC12F629. After removing their part and replacing it with a PIC12F629 and trying some programming - I deemed that the original part was not a standard 8-pin micro and probably some type of specialty part, a-la the UCS1212.

Well, a blog reader informed that yes, indeed, you should be able to do this design with an 8-pin PIC12F629. You just need to tristate the GPIO pins to the LEDs you do not want lit.

After years of working as a validation engineer on new silicon, I am not hesitant to go back and rerun tests if questions are posed. No ego here. Thank God for that. Sometimes you are right - sometimes you are wrong. And sometimes, when you are wrong, it means the situation is actually better.

So - it turns out that I did the tests I ran before _did_ tristate the unwanted GPIOs, but I was still seeing multiple LEDs being lit - albeit that only the target LED was fully bright, and the rest were semi-bright, looking quite like leakage of some sort.

It turns out that I did my testing with the PICKIT2 still connected to the design. The PICKIT2 allows you to program the PIC12F629 while assembled in the design. Nice. But the PICKIT2 connects to GPIO0, 1, & 3 and can mess things up - which I found out when I disconnected the PICKIT2 and the meteor light started behaving as expected / desired.

So - yes, it is some sort of 8-pin micro. Yes, you can replicate the design using a PIC12F629. So - have at it!

Here's a new schematic (V2.00):


Here's source code for the test program:

Meteor_Lights.ASM (V1.02): http://pastebin.com/3dVrGELs
Common.INC (V1.04): http://pastebin.com/rKDCCKZS

Videos and pictures after the break.




Here's two short movies: one with the PICKIT2 connected to the design, one without:

video
With the PICKIT2 attached

video
With the PICKIT2 removed

And some pictures of the experience:

 The meteor light before removing the 8-pin part

 Their 8-pin part removed

The PIC12F629 board I am going to use

The ugly underside of the PIC12F629 board

 Connecting between their board and mine with a
2x4 pin berg header

 Adding wires to solder to the Berg header

 Everything connected

 This is what I was seeing with the PICKIT2 attached

 
The complete testing setup. Yes, that's PONG lazing around.

1 comment:

  1. nice project , i'm trying to compile the asm file
    and i get 3 error
    "Directive only allowed when generating an object file
    at line 53 , 61 ,70

    ReplyDelete