Go Down

Topic: ATTiny85 and melexis90615 (Read 690 times) previous topic - next topic

adumas

Hi... I am trying to use an attiny85 with the melexis90615 sensor.

I can read the sensor using the i2cmaster library with a duemilanove/328 chip and have no problem.

I can program the attiny85 to blink some leds with no problem.

However, when I try to compile the attiny85 using the same program that I used with the duemilanove, I get an error: PORTC, PORTC4, PORCT5 was not declared in this scope...

Any ideas about how to fix this problem?

RIDDICK

attiny85 just has 6 IO pins... on PORTB...

is the "T" in PORCT5 a typo?
-Arne

adumas

Hi... Yes, it was just a typo in my email...  My goal was to see if the i2cmaster library could work with an attiny85. 

RIDDICK

#3
Jan 04, 2012, 08:45 pm Last Edit: Jan 04, 2012, 11:21 pm by RIDDICK Reason: 1
u cound try to change PORTC/PINC/DDRC in the source code to PORTB/PINB/DDRB...

EDIT: ohoh: the pin PB5 of an attiny85 is the reset pin and would at most be a weak output pin, if u turn off external resets (but then u need another way to change the flash memory (via the spm instruction))...
-Arne

Coding Badly


http://code.google.com/p/arduino-tiny/wiki/TWIMasterLibrary

adumas

I'l check into the library, thanks.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy