Go Down

Topic: Use .Ino langauge to program another chip (Read 644 times) previous topic - next topic


So I am sitting here with an Arduino Uno and a ATMega8535. I accidently bought a wrong chip it seems to work with C however I either know C or truely understand this sample code which I want to use (: ...

I want to know if I can be a lazy b*** and somehow use the INO file which Arduino uses and transfer it into my ATMega8535.
I manged to get the .hex file however as its wrong chip the signature is wrong. With AVR dude I get this error:

Code: [Select]

C:\Users\Doge\Downloads\Avr>avrdude -c arduino -P COM3 -p atmega8535 -U lfuse:w:
0xc1 -U hfuse:w:0xd9m -U flash:w:RGB_Panel_Paint.cbb.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA8535 is 1E 93 08
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

Regards a lazy boy named Zanaj (:


The program is saying that you don't have one ATMEGA8535.


The program is saying you have a ATmega328P (signature 1e 95 0f).


The program is saying you have a ATmega328P (signature 1e 95 0f).

That is a UNO, right?


Yh I programmed a program with Arduino uno FOR arduino Uno and took that file into my ATMega8535 and my question is if you can somehow convert the signature or something?


The hex file contains the binary data, and the binary data for the ATmega328p will do something completely different on the ATmega8535.

The Arduino IDE can be adapted for other microcontrollers, as long as the gcc compiler and avrdude supports it, and I think they both do. Adding a new microcontroller to the Arduino IDE is not easy, you could easily miss a few things, like something with the extra pins or internal timers.
I read that someone already made the ATmega8535 work with Arduino, but I can't find it. I did find this: http://forum.arduino.cc/index.php/topic,97695.0.html


I see would I need to run it as ArduinoISP or how do I connect my arduino uno to my ATMega8535 to the uno? The forum or website doesn't supply that much info can't find much on the internet either.


You can use a programmer or "Arduino as ISP" to program the chip. Use those MISO,MOSI signals.


Jul 22, 2014, 12:57 am Last Edit: Jul 22, 2014, 01:08 am by spil778 Reason: 1
I got it to work with blink sketch but how do I know which port to define?

I never worked with this before but looking at these two datasheets:
http://www.thierry-lequeu.fr/data/ATMEGA8535.jpg - atmega8535
http://cdn.instructables.com/F1P/WPB9/H337KORO/F1PWPB9H337KORO.MEDIUM.jpg - atmega328

PD6 = port 6
So on the atmega8535 pin 20 = port 6?

However its only reacting on pin 1 on atmega8535

My code is simply the blink sample but just on port 6 instead of 13

I only connected what ArduinoISP told me to and then VCC and GND connection.
Then an LED to pin 1 works but not to pin 20 as it should, as far as I understand owo


So I am sitting here with an Arduino Uno and a ATMega8535. I accidently bought a wrong chip it seems to work with C

The reality is that you will probably waste so much time trying to get the 8535 to work that you would be better off ignoring it and buying a 328 chip.

If you really want to be able to program the 8535 you will need to study the datasheets for it and for the Atmel chip that is already used by the Arduino system and that is the closest match for the 8535. You will need to understand all the differences and similarities between the chips and understand where the requirements of the new chip need to be defined within the large collection of files that constitute the Arduino system. It is unlikely yo be impossible. But if you are starting from scratch I would allow yourself 2 or 3 weeks of long days to get it done.

Two or three hours spent thinking and reading documentation solves most programming problems.


I'll then make this with atmega328p Thanks for your time! Have an amazing day (:

Go Up