PDA

View Full Version : Mini-Miles Resurrect



Xenon
22-07-2005, 06:01 PM
I've just finished building a few Mini-MilesTag sets, and can't get them to 'resurrect' from the default dead state after they are powered up.
I've tried clone and restart signals from a MilesTag 4.xx set with a range of different team and player configurations, with no luck.
When the clone or restart signals are received by the Mini-MilesTag set, the piezo tone changes slightly for an instant, but remains locked on.
Has anybody else had this problem? Am I doing the right thing to resurrect the 'tag set?
The PCB was designed according to the schematics, and no tracks have been bridged by solder or anything like that.
Thanks for the help!

Xenon
23-07-2005, 07:11 PM
I'm out of ideas; I've worked on this all day and haven't had any luck.
Are the only fuses that really matter when programming the PIC the Internal Oscillator and MCLR pin settings? I've tried a heap of different fuse configs with no luck.
I can't see any differences between my PCB and the schematics, but does anybody have a verified PCB layout I could try out?
I've swapped out every component on the board with new ones, it's running on fresh batteries, tested the resurrect signal on other 4.xx boards to be sure the signal is not corrupt, and I've etched the PCB twice over just in case there was some tiny defect I couldn't see, but still have the same problem.
Please Help :(

milestag
24-07-2005, 02:09 AM
I don't have my test circuit for that version, but I looked back at the code (it's been a while since I built one). I do see that it powers up in "dead" state. And the code for receiving the resurrect signal looks correct. I believe the code is okay.

I think the problem is the PIC12F629 internal oscillator's calibration. It is probably just far enough off that the 4.xx timing is incompatible. I've seen this before and I have adjusted the timing tolerances to compensate but I can't tell you right now which versions were compensated. The real problem is that the PIC12F629 oscillator is not as accurate as the PIC16F648A (+/- 1%). So some 12F629's will work and some won't. This is another reason I'm switching to the 16F684 for the MiniMT. It has the precision internal oscillator.

If you have PBP, it's possible to adjust the timing values or to recalibrate the oscillator, otherwise you will have to wait another month for me to get everything back in operation here before I can help.

milestag
24-07-2005, 07:17 AM
I attached a couple new MiniMT builds in the zip file.

Still MCLR_OFF and INTRC OSC as before. PIC12F629.

MMt1p1.hex = Team1 Player1
MMt2p2.hex = Team2 Player2

Both of these start in "live" mode so you can reset by cycling power to the circuit. This way you can see if the circuit is taking hits. If not, it's probably the oscillator frequency slightly out of tune as I said above.

Note: I have NOT tested these builds, but the changes were very minor so they SHOULD be fine.

regards,
Jim

Xenon
24-07-2005, 10:29 AM
Thanks a lot for the help, it looks like it is the internal oscillator causing the problems; the Mini-MT set with the newer code only receives near misses (I changed the code a bit to give the near miss sound a clearer signature, and recompiled it to be sure).

Changing a sound I can do, but oscillator recalibration is still beyond me as far as PICBasic goes, so I'll probably need some help with that one, whenever you have the spare time.

milestag
24-07-2005, 01:46 PM
The other option (easier) is to loosen the timing tolerances in the part of the code that determines if a bit is good/bad/1/0 etc.

I attached a version with slightly looser tolerances for bit timing. It COULD make the system a bit more susceptible to errors, but let me know if this helps.

Xenon
24-07-2005, 03:04 PM
I tried it out on a few different PICs, with no luck - still the same near-miss errors.

milestag
24-07-2005, 04:27 PM
Hmmm. Okay, I'll let you know when I get a chance to test it here.

BTW - Make sure the two guns are set to DIFFERENT team IDs, or you will only get near misses. That's true for hits and resurrect signals.

Chris_1
24-07-2005, 07:38 PM
can anyone converert this zip of .pbp into .hex please!

because i've onle got the demo

thanks,

Chris

Xenon
24-07-2005, 07:42 PM
The compiled HEX files are attached to this post.
I've taken the team and player ID's into account when testing. I really wish the problem was that simple. ;)

Chris_1
24-07-2005, 07:45 PM
TRANSLATION:

I mean that i havent got the $249 USD Pic Basic Pro so can somone convert this zip of files into .HEX Becase i made Them using the demo of Pic Basic Pro

Chris_1
24-07-2005, 07:49 PM
The compiled HEX files are attached to this post.
I've taken the team and player ID's into account when testing. I really wish the problem was that simple. ;)

Thanks,
;/
chris

Xenon
27-07-2005, 03:46 PM
I completed the Mini-MilesTag port from the PIC12F629 to the PIC12F683 today and tried it out; it fixed all of the problems I was having. The player restart, clone, and weapon hits all function without a problem.
Maybe those spare PIC12F683s will come in handy after all ;)
It leaves me wondering though, why do these work when they are calibrated to the same tolerance as the PIC12F629s?

milestag
28-07-2005, 08:10 AM
The 12F683 is factory calibrated to +/- 1%. This is true of alot of the newer PICs with internal oscillators. The 12F629 is one of the older variety that is not as precisely calibrated.

Also most of the newer PICs have lower power consumption (nano-Watt technology).

BTW - I successfully ported to the 16F684 (including hardware PWM and ISD sound), but I have some updates I want to do before releasing it.

Xenon
28-07-2005, 04:25 PM
The update sounds great, I can't wait to see the changes, it sounds very promising.

Do you think the use of a bi-colour LED as the status LED would be worth adding to the circuit? It could then double as the ammo status and hit warning, flashing red when you've been hit and normal solid green when the clip isn't empty. I don't think it would add too much cost to the circuit, and would be reverse compatible with a normal monochrome LED in the case it does.

Should I forget trying to get the 12F629s to work with my other 'tag equipment? Or is there a
tweak I could try using?

rectifier
02-08-2005, 07:51 AM
Congrats on the port Xenon.

That bi-color LED is a great idea! It would add almost no extra cost - all you do is replace the regular LED with a bi-color, which is still really cheap, and go high/low/tris with the pin to get red/green/off.

Time to reflash my guns again... :D