DiyLightAnimation

Hardware => Lynx Express => Topic started by: Gary on January 20, 2012,

Title: Where on the Express is the Starting Channel Saved?
Post by: Gary on January 20, 2012,
I'm setting up a new(er) laptop for my Christmas light stuff. I installed the MPLAB software for the PICKit 3 on it and in order to verify that it works, I first manually set the start channel on the Express to something other than the default 001 using its buttons; I set it to 004. I then programmed the PIC chip using MPLAB, and was surprised that the Start Channel remained at 004. I reset and un/replugged the Express and it stayed on 004. I erased the PIC chip and then the Express became non functional (i.e. pressing the reset button didn't reset the unit) so I knew the PICKit was working. I then re-programmed the chip and the Express started working normally again, but the Start Channel remained at 004.

I thought that the start Channel would be set back to 001 as part of the default program? Where is the info stored? While I'm asking, where would the light curve info be stored?

I realize that it's not important to ask these questions because it is working, but I'm the type of person who wants to know how stuff works.
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: chrisatpsu on January 20, 2012,
it's stored on the chip, but you can change the start address from the buttons on the express itself.
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: Jeffl on January 20, 2012,
Me too however it would be over my head.  It's not part of the firmware as you just confirmed.  I think it's in the EEPROM.  I'll wait to see if I win a prize. :)
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: chrisatpsu on January 20, 2012,
as far as the exact location, that would be RJ, and that's part of the programming that he usually does not talk about. that's all his baby.
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: Jeffl on January 21, 2012,
A link with some info.  There are locations in the PIC for different things to be stored.  The LOR controllers do the same thing so it's normal.

http://www.edaboard.com/thread206785.html
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: Gary on January 21, 2012,
You are not allowed to view links. Register or Login
A link with some info.  There are locations in the PIC for different things to be stored.  The LOR controllers do the same thing so it's normal.

http://www.edaboard.com/thread206785.html

Oh I see... the PIC chip has different "compartments" for different purposes... one for the program and one for settings, so to speak.

P.S. I can't believe the super fast reply to my question.
Title: Where on the Express is the Starting Channel Saved?
Post by: rm357 on January 21, 2012,
Not really compartments, but different technologies in different address ranges to address different needs.

To store the address in flash, you would have to use an entire block of memory for a couple bytes of data. Flash is written and erased in blocks. I dont know what the block size on the pic is, but it's probably 128 byes or more...

RM
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: SteveMaris on January 21, 2012,
One less question floating in my brain.
Thank you.
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: RJ on January 21, 2012,
It is in the flash program memory so you can not reflash it without overwriting it.

when you flash it with the hex from the wiki it is already set to channel 1.

This means one of a few things happened.

You flashed it with a copy pulled from it with the channel already set, You did not really flash it but thought you did, or it never erased at all and your still running the same firmware.
Title: Re: Where on the Express is the Starting Channel Saved?
Post by: Gary on January 21, 2012,
Oh, I think I know what I did. First I opened the Hex file from File | Import. During one of my steps to verify that the PICKit could read the PIC chip (before attempting to write), I chose the Read command. I guess that when I used the Program option, it took the firmware that I just read, rather than the firmware from the Hex file I got from File | Import. I guess I should have used the Verify option to read the chip rather than using Read.