read a hex file that is burned on msp430F169 microcontroller - msp430

I have a program running on one of my msp430F169 microcontroller.
I donot have the source code for the same.
I had only the hex file that i used to burn and it is misplaced.
So I just want to read this program (hex file) from this microcontrollers and burn it on another same microcontroller.
We use a Olimex Jtag tiny V2 programmer.
Is it possible to do so.?
Thanks in Advance.

Related

How can i convert MP3 into PWM?

For a project that I am doing I am trying to essentially convert an mp3 file into vibrations. I have talked to staff at SparkFun Electronics who set me up with the Lilypad Vibe Board and the Arduino Uno. It is in my understanding that with the Arduino Uno its unable to read an MP3 file and convert it into PWM so that the Lilypad Vibe Board can produce the vibrations. Does anyone know if there is any code or another device that will allow me to do this? I have researched the Raspberry Pi but am also unsure as to if this will work in the way i would like it to work. Any help would be greatly appreciated. My aim is to take an mp3 file, convert it into PWM so that the Lilypad Vibe Board would be able to create the vibrations in relation to the mp3 file.

arduino as isp and to burn atmega16 using avrdude compiler

I am trying to burn my atmega16 with arduino as ISP. So far the codes have been uploaded to my arduino flawlessly. I have uploaded arduino as ISP codes to my arduino, I have burnt bootloader of atmega16 using arduino IDE. As I sent the core working code from arduino IDE this went flawlessly. But the atmega is not showing the response, i.e. hardware is not working. And that is my (case I) issue. Case II: Furthermore, when I tried sending hex file (core working code) with avrdude compiler, it says ser_open() ... can't find lpt1. Is this the problem of avrdude's compiler? In case II there it didn't even uploaded the code, let alone the working of hardware. Please help.
The fact that it's trying to send it to the LPT1 parallel port suggests you haven't specified "Arduino as ISP" as your programmer. Also make sure you do a Control-Shift-U (upload via programmer) instead of Control-U (upload via the bootloader). Finally keep in mind that uploading code via an external programmer will overwrite the bootloader so you won't be able to upload via USB after that unless you reflash the bootloader or do it via the command line.

USB host shield on Arduino Uno

I downloaded USB host shield code from the following website:
https://github.com/felis/USB_Host_Shield_2.0/archive/master.zip.
This contains too many files to which one I have to include for my application.
I want to know if USB host shield can be mounted to work in Arduino Uno. If yes can anybody provide me sample code to read SD card text file using USB host shield for Arduino Uno ?
I suppose that by "reading a SD card text file" you mean plug a SD card in a SD-USB adapter and then reading the file from it.
If so, there should be an example in the library called testusbhostFAT (here you will find the online version) where they read files stored in a FAT HDD (and I think that SD-USB adapters are seen as HDDs or FDDs).
Anyway they explicitly say that
This will not run a Arduino Uno due to the limited ram available in the ATmega328p.
By looking at the code maybe you will manage to slim it enough to run it on a Uno, but... Well, probably it's a bit hard.
Bye

No bootloader overwrite when programming Arduino with AVRISP

Whenever I need to upload the bootloader to my Arduino Mega (ATMEGA2560) I use an AVRISP MKII with the fuses/lock bits described in boards.txt file. Doing this I am able to burn arduino sketches by serial connection with my FTDI.
My question is: is it possible to burn arduino sketches (.hex files) with the AVRISP but keeping the bootloader? Whenever I try to do that (I use the same avrdude command I use to program the bootloader but changing the bootloader .hex file to the sketch .hex file) I am no longer able to program the processor with FTDI (and then I need to program the bootloader again).
I think (of course I can be wrong) this problem occurs due to the fuse and lock bits settings that cannot be the same as those used to program the bootloader.
This is the fuse settings I use (from boards.txt file under Arduino folder)
mega2560.name=Arduino Mega 2560 or Mega ADK
mega2560.upload.protocol=wiring
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200
mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F
mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino
mega2560.build.variant=mega
Can you help me?
Thanks in advance.
Some controllers like the AT*X*MEGA series support individual flash sections that can be programmed/erased independently. However, with the ATMEGA2560 this is not possible.
One way would be to concatenate the .hex files as part of the build process. This can be achieved with some modifications to the makefile.
Something similar to this
all: $(TARGET).hex
srec_cat bootloader.hex -intel $(TARGET).hex -intel -o combined.hex -intel
Flashing the ´combined.hex´ would then include both, main application and boot loader. There is a related discussion on AVRFreaks.
Regarding the fuses, you just have to make sure that the boot loader (address) stays configured as the entry point.
EDIT: You can use this fuse bit calculator to verify fuse settings. Select your device and make sure "Boot Reset vector Enabled (default address=$0000); [BOOTRST=0]" is enabled with your current high fuse value.
You currently use
mega2560.bootloader.high_fuses=0xD8
so that seems fine.

Arduino - Play MP3 From SD Card

I have an SD Card Shield from seeed studio attached to my Arduino Uno board. I also have an SD card with a siren .MP3 file in it. I want my Arduino board to play the MP3 file but I am not sure how to get it to do that. I have a speaker connected as well.
As mentioned the Arduino is not able to decode MP3's. As an alternative you could convert the MP3 to the less cpu intensive WAVe file format then use Adafruit's Wave library to play the file out a pin.
Or you can use the VS1053 Co-Processor Shield to play the MP3 file.
The Arduino Uno does not have enough power to play MP3s in software. You will need to get a separate hardware MP3 decoder and instruct it to play them instead.
There is a new Library that will play WAV files. It can be found at https://github.com/TMRh20/TMRpcm

Resources