Pages: [1]   Go Down
Author Topic: ATTiny85 and melexis90615  (Read 553 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

* MLX90614.pde (1.34 KB - downloaded 3 times.)
Logged

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

is the "T" in PORCT5 a typo?
Logged

-Arne

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Brunsbüttel, SH, F.Rep.GERM
Offline Offline
God Member
*****
Karma: 4
Posts: 596
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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))...
« Last Edit: January 04, 2012, 05:21:22 pm by RIDDICK » Logged

-Arne

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12737
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 87
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'l check into the library, thanks.
Logged

Pages: [1]   Go Up
Jump to: