|
Post by sinewave on Dec 18, 2014 0:49:51 GMT
Good Day, I have constructed the accessory decoder as indicated in the function decoder manual. The only problem is, I cannot get it to work on my MRC Prodigy Advance system. When I program the PIC16F630 with the function decoder software, it works great. I am using the AccV0.06Beta1 software and a PICkit2 to program the chip.
Is there something I am missing?
Any help appreciated.
Adrien
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 18, 2014 15:35:11 GMT
There is some confusion about accessory decoder addresses.
Some command stations will interpret address 1 set in the decoder as address 0, and your command station might not allow you to control address 0. So you have to program CV1 to be 2 in order to make it respond to address 1 set on your command station.
Or something like that, I think some of the earlier posts in this forum talks about this.
|
|
suzie
Keen DIYer
Posts: 30
|
Post by suzie on Dec 18, 2014 15:59:35 GMT
You might like to try setting CV1=3 and see if you get any response on accessories 1-8 (probably will work on 5-8, in which case CV1=2 will give 1-4). Most command stations other than Roco will not work when CV1=1.
|
|
|
Post by sinewave on Dec 18, 2014 19:31:10 GMT
Thanks for the suggestions. I did see those recommendations in other posts but still have not had any luck, even on my programming track. Does anyone out there have the software with those changes already implemented? I'm green when it comes to PIC programming software so I would not know where to make the changes that way.
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 19, 2014 9:00:07 GMT
This should be a hex file with the default for CV1 set to 3. I have not tested this.
|
|
|
Post by sinewave on Dec 19, 2014 17:26:11 GMT
Thanks for the hex file. I am now able turn on each of the outputs using accessory 5 - 8. One output will go active when either an "on" or "off" command is sent from the controller. Once the outputs are active, they remain on until power is disconnected from the decoder. So... we are almost there.
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 21, 2014 14:33:47 GMT
I hadn't really experimented with the accessory decoder yet. But I wired one up on a small breadboard, and immediatly fried my ony 12F675 in DIP package by thinking i knew the pinout of a 78l05. But I have several in SOP and a couple of programming adapters, so I managed to get it working. Upon which I learnt that my command station (Digitrax Zephyr) doesn't send deactivate commands either. I sort of knew this already from making accessory decoders with an Arduino. I then tried to set CV33 to turn on toggle mode. As described here here. This was no great success as every CV i tried to write, and the following address, turned into 255. I then tried making the CV33 change in the source file and recompiling. Now I could get a pair of outputs to toggle. If I from my command station send Switch 5 thrown Output A will be on and output B will be off, and if I send switch 5 closed output A will be off and output B will be on (or possibly the other way around.) I think this is as close as you will get with this firmware and a command station that doesn't send deactivate commands. Now regarding the writing of CVs i sort of remembered a post in the function decoder forum that talked about some bug regarding CV readback. This post here. I made the changes to the direct bit mode from Suzies post and now I am able to make changes to the CVs. I did not make the changes to paged mode as I didn't fully understand them, I will have to take a closer look later, but as long as you program with direct mode it should now work. The attached hex file has CV1=3 and CV33=15 (toggle outputs) as defaults, and reading in direct mode fixed. The source file in the download package seems to be version 0.4, but on the accessory decoder webpage there is a reference to version 0.5. It says that version 0.5 should have pulse outputs. Is version 0.5 available anywhere?
|
|
|
Post by Paul Harman on Dec 22, 2014 17:00:16 GMT
Version 0.5 is superseded by the 0.6 version that Sinewave is using which should not have problems when reading in direct mode. I have attached it here. Attachments:AccV0.06 Beta 1.zip (17.14 KB)
|
|
Trond
Keen DIYer
Posts: 18
|
Post by Trond on Dec 22, 2014 19:28:22 GMT
Ah, I see now that he is referring to version 0.6. I didn't notice and just assumed that the version on the download page was the latest.
I'm sorry if I introduced more problems than I solved.
|
|
|
Post by sinewave on Dec 30, 2014 4:47:08 GMT
No further problems introduced. At least I can now turn the outputs on. I will play with the CVs some more next weekend when I have some time. At least now I can access it from my MRC cab. Thanks for the help everyone.
|
|