help programming eeprom with spin tool?
purplemonkey
Posts: 89
just wanted to check i'm doing this right. loading up spin file in prop tool and then going to compile current - load eeprom then load ram (what is the difference)?? then should it just work when switched on? i don't have to unplug prop plug or anything. can't seem to find any good tutorials on just getting the code onto the chip.
Comments
Load RAM will compile the code and download it to the Prop RAM. It will then run immediately. If you power cycle the Prop or reset it the code will be gone from RAM and the Prop will run the code from EEPROM (if any).
Load EEPROM will down load the code and "burn" it into your EEPROM chip. The code will run immediately. When you power cycle or reset the next time the Prop will run the code from your EEPRO again.
No unplugging/replugging is required.
Or if you want to be sure your old program is gone and you don't have another to replace it just create a Spin file with nothing but a single PUB method in it and program that to EEPROM.
I mean, where does control go in each case and why would it be different?
Binary files like wavs can be included in objects DAT sections using the "file" statement.
The manual is your friend.
To debug quickly, download it to RAM with F10. You might do this many times while debugging.
Once it works, download more slowly to eeprom with F11.
I don't have the source code you have but I think you may be confusing objects such as wav files etc with code objects.
I would leave the wav file as it is because the main code object probably references it somewhere, i.e, reads the file and then plays it through the code.
I've probably made myself as clear as mud but feel free to keep asking questions. I'm new to the prop and can vouch for all the guys on here being really friendly and helpful.
Stupid questions are the best kind to ask
(edit) - Also download and listen to "First Spin" www.firstspin.tv It's great to listen to while you're tinkering, driving, whatever and a lot of the questions I had at the beginning were also asked by atdiy
It's good stuff
http://forums.parallax.com/showthread.php?137751-DEMO-new-FM-broadcast-code-using-Chip-s-Video-mixer-method-explanation&highlight=fm+transmitter
In future, any spin objects that get called into code are put under the OBJ heading
Can you explain a bit more about what you want to do -that is a link to posts about radio comms. There are other obex objects that can play .wav files. Many things are possible here - what is the task you want to do?
No. Did you read what I said above?
You can include any data from a file into the DAT section of an object with the "file" statement. That buts the bytes of the file content into the DAT section just as as if you had used a lot of byte declarations.
Now I am only assuming that is what is happening in the obect you are talking about. It could be that it is reading the wav file from an SD card at run time.
The manual is your friend.