|
Post by johnca51 on Jan 9, 2012 11:28:52 GMT
Hi Paul, With the Microchip Pickit 2 programmer I have bought I am able to turn of the epromm data which then allows me to verify the program memory only, well at least I think so anyway. The process i have been doing is, first of all delete all the data, if any off of the PIC, then confirm that it is blank. Import the motor decoder hex files and when confirmed, proceed to write to the PIC with the eeprom box open or un-checked. Once the data is confirmed as being successfully loaded, I then un-check or close the eeprom box, I am able to press verify which in all cases doing it this way has allowed for, i assume, successful verification of as I mentioned the program memory only. I am not sure of what you mean by, Once CV7 and CV8 are set correctly the CV settings will not be changed at power on, but will never match the state they are in when initially programmed. I am using the 12F629 PIC's I seem to be able to make changes to the CV's via my Digitrax controller because it is coming up "GOOD" with every change I make. There are no shorts otherwise the controller would automatically close down until the short is rectified. I have read through all of the information and previous problems people have encountered and the possible causes and still am having no success. There has been mention of motors running only one way etc, but I do not and cannot get any voltage on the grey and orange motor wires no matter what i seem to do. I have voltage either side of the 78L05 as per the suggestions and the voltages on the pic socket are all within suggested numbers. It just seems that after the power section it all falls apart. One thing I have just noticed is I went by the parts list for the function decoder and used 2k2 resistors for R3 & R4, whereas I notice in the motor decoder parts list they have been changed to 1k 1%. Would this be a source of problem or does it come back to the programming situation. Sorry to be a pain with this but I am becoming more and more determined to not have these things beat me. Regards John
|
|
|
Post by Paul Harman on Jan 9, 2012 23:52:51 GMT
John
Changing the 2K2 resistors to 1K is just to make sure that the decoder works optimaly with higher track voltages (20V+) as well as lower track voltages.
Without a PIC in the decoder, but with the L272 in, you should be able to get the motor to run one way by linking pin 1 to pin 3 and pin 8 to pin 5 on the PIC socket, reverse the connections pin 1 to pin 5 and pin 8 to pin3 and the motor should run the other way. If that is not working you need to check the wiring around the L272.
Your PIC programming procedure is sound.
Just to clarify what happens when the PIC is first powered on, it checks to see that CV8 matches the manufacturer ID. If there is a discrepancy it assumes that the CVs are corrupt and resets them all to the factory default setting. CV8 is set last of all so that if the power is interupted during the reset to defaults it will carry on resetting from where it left off. Once CV8 has been written to be the manufacturer ID it will always match at power on and the CVs will be left alone.
This means of course that should you write to CV8 all the CVs will be returned to factory default.
CV8 is the only CV that is loaded from the .HEX file and to ensure that the CVs are all set to default it is different to the manufacturer ID. Once the PIC is powered up it sets all the CVs to factory default and the factory default does not match the .HEX file - hence the failure to verify the data.
|
|
|
Post by johnca51 on Jan 13, 2012 12:14:16 GMT
Hi again, Did as you suggested and yes I can get the motor running in both directions, so that is a bonus! I still connot get any response from the decoder when I connect it to DCC however. i am able to change my controller to 14 steps for loco3. Should i be getting a response straight away or do I have to go and program all the CV's ? I actually did this just for the hell of it but again no response. I am having absolutely no problems with programming the factory decoders I have installed, some 15 function and 2 sound to date but these things have really got me stumped. I have just tried using another PIC programmer software namely MPLAB IDE to program a couple of PIC's so I will try those and see if I have any joy. I am fast running out of things to try so i really am hoping i get a breakthrough soon. I contacted Jeff just recently regarding buying a couple of kits thinking I could at least try one of the pre-programmed pics in my decoders. Jeff asked me to send a list of what i wanted to purchase and he said he would get back to me with what he could supply, but as yet I have not heard from him. Anyway will stick with it!! Regards John
|
|
|
Post by Paul Harman on Jan 15, 2012 0:30:10 GMT
It looks like your PIC programming is probably OK, and the decoder should run straight away on short address 3 with 14, 27 or 28 step mode. I suspect that there is something wrong with the input circuit around R1, R2, R3, R4, R14, D2 and C4 with the connections to pins 6 and 7 causing the DCC signal to be corrupted before it gets to the PIC.
|
|
|
Post by johnca51 on Jan 17, 2012 7:29:26 GMT
Hi Paul, I have checked and double checked all of the components you mention on all of the decoders I have assembled so far. It appears that everything is OK. Is there a particular way that R14,C4,R3, R4 and D2 should be connected together as I have just grouped the wires together at the top and soldered them. Does D2 specifically have to be connected to the top of R3 for instance. Also does the wire coming in from pin 7 on the L272 need to be connected specifically to the top of R14. Is there any particular way that C4 needs to be positioned? I will endeavour to send through a photo in the hope that you may see something that is obvious. Regards John
|
|
|
Post by johnca51 on Jan 17, 2012 7:39:25 GMT
Here is a photo i mentioned above Regards John Attachments:
|
|
|
Post by johnca51 on Jan 17, 2012 7:42:45 GMT
Another photo John Attachments:
|
|
|
Post by Paul Harman on Jan 17, 2012 17:30:59 GMT
Unfortunately the pictures are a bit too out of focus to see anything.
D2 will need to have its cathode (stripe end) down, but the other components don't have a right and wrong way. If you are measuring 0.6V or thereabouts on the common connection of the components they are probably correct.
The next test would be to put a dual trace osciloscope on pins 6 and 7 of the PIC to make sure that the DCC waveform is correct on the input to the PIC comparator.
|
|
|
Post by Paul Harman on Feb 10, 2012 0:43:44 GMT
John
I have finally got round to analysing your dump, and I cannot see which firmware you are using - it does not match the current function or motor firmware. Please try downloading the latest to make sure that you have the correct .HEX file to load.
|
|
|
Post by johnca51 on Feb 26, 2012 8:00:48 GMT
Hi Paul, Just letting you know I have not given up trying to get these decoders to work. I am just having a rest from them as I found i was starting to get frustrated and they were getting the better of me. I will do as you suggested re hex file and see waht happens. Regards John
|
|
|
Post by johnca51 on Jun 4, 2013 11:08:56 GMT
Hi All, I'm back!! In my last message I indicated I was going to take a break from trying to master getting these decoders working. Un fortunately my health deteriated somewhat in the form of a relapse of the Multiple Myeloma (Bone Cancer) I was diagnosed with nearly 8 years ago. Thanks to the support of my family and the Hospital staff at the Royal Adelaide Hospital I am now back to a stage where I am keen to have another shot at these decoders. I have 7 units which i have assembled and have not got working at this stage. If anyone can give me a few pointers as to what I may be doing wrong or can help me out with an assortment of close up photos of the units they have successfully built. I must be extremely close to success but obviously missing something. The components I am using are all within the requirements and specs and I have now purchased at least two PIC programmers but still no success. I will however persist and not give up. I will succeed! Your input will help me!! Kind regards John C
|
|
|
Post by Paul Harman on Jun 7, 2013 22:19:53 GMT
Hi John
It is probably time to start from scratch and check everything systematically. Get the decoder without the PIC or L272 installed and check the voltages on a 12VDC supply first and then on a DCC track supply.
with reference to pin 8 of the PIC socket in each case measure the following voltages:-
1. Pin 1 of the PIC socket - should be a constant voltage somewhere between 4.5V and 5.5V whenever the decoder is powered
2. The top of the vertical components (D2, C4 etc.)- should be between 0.6V and 0.7V
3. Pin 6 of the PIC socket - should be less than 2V when the decoder is fed with DC one way, and more than 2V when the decoder is fed with DC the other way.
4. Pin 7 of the PIC socket - you should see the same voltages as pin 6 but the opposite way round.
5. Pin 6 and 7 of the PIC socket - both should be the same voltage somewhere between 1 and 3 V when the decoder is fed from a DCC track supply.
That is all the key bit to verify that the power supply and dcc signal paths are all working OK. Once that is done program a PIC with the latest motor firmware, plug it in and try changing the address on the programming track to somewere between 1 and 9 (but not 3). Ignore any errors you might get from the DCC command station and remove the PIC and put it back into the PIC programmer and read it. the first EEPROM location zero should contain 01 and location 1 should contain a hexadecimal representation of the address you just programmed which should be different from the default 03.
When you have got this far it should be quite plain sailing.
|
|
|
Post by berry120 on Dec 4, 2013 16:10:33 GMT
Hi, aware that I'm jumping in very late here, but thought I'd just share my experience in terms of getting the PIC chip programmed. I kept getting verify errors on my first tries as well - in fact I couldn't program the chip with anything, even a simple program to flash an LED (it might be worth checking you can do this in case it is just a programming issue!)
I was using an official Pickit 3 and I was pretty sure it wasn't faulty - it worked fine on another computer. Turned out in the end the problem was that it wasn't getting enough power to program the chip properly from the USB port - and the error messages were giving very little indication of this!
If this turns out to be the case for you as well, then I'd suggest running it straight from a good, *powered* USB hub on its own (or try unplugging all other USB devices if you don't have a powered hub.) As soon as I did that it was fine, and I haven't had an issue since!
|
|