Go Down

Topic: i2c atmega32 and arduino (Read 219 times) previous topic - next topic

arashsoft

Jan 12, 2019, 10:05 pm Last Edit: Jan 12, 2019, 10:06 pm by arashsoft
Hi I program atmega32 by arduino sketch and mightycore to compile and flash hex file

but i does not work

i simulate in proteus it does not work too,


all the code checked but i used these code too

https://www.arduino.cc/en/Tutorial/MasterWriter


arduino as a slaver

atmega32 as a master


* even pinout checked

 

septillion

Do you use that code EXACTLY? Or did you make changes?

And what about a circuit diagram? Please NO Fritzing breadboard mess! A simple hand drawing will do.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

arashsoft

Exactly code

Wiring was So simple

A4 > A4
A5 > A5

I would like you to check in it in proteus

septillion

Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

hansibull

#4
Jan 13, 2019, 03:12 pm Last Edit: Jan 13, 2019, 03:12 pm by hansibull
You can't use A4 and A5 for i2c on ATmega32. i2c is on pin D16 and D17.

Documentation vise MightyCore is decent enough. If you have a look at the pinout pictures you'll quickly see that ATmega328P (Arduino UNO) and ATmega32 isn't exactly pin compatible.
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

arashsoft

OOOOOOOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHHHHH


What a .....


Thanks...



Go Up