Pages: 1 ... 13 14 [15] 16 17 ... 19   Go Down
Author Topic: LumiNet (based on attiny84)  (Read 57676 times)
0 Members and 1 Guest are viewing this topic.
The Netherlands
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You dont have to set the pinmode for analogread.
To read pin 12 (pa1) you have to use analogRead(1);
PA1 = 1
PA7 = 7

PA0 pin 13 is the aref, don't use this pin, it doesn't have internal pull-up enabled, and can destroy stuff. And i know, i have killed 4-5 leds on this pin when i was making the core, trail and error  ;D
« Last Edit: June 03, 2010, 05:44:25 pm by SuperCow » Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I havent had the chance to sit down and play with your new revision, is there anything different aside from 18 compatibility?

asking cause I have it all setup and working great from your last version, and wondering if I would benefit by upgrading (in mid project, been using your older version for a few weeks now)
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SuperCow (like the new avatar btw),

I did as you said, removed the pinMode line and used analogRead(1)
for PA1 (also tried 2, for PA2) and fed the voltage at pin12 (and pin11 also).

Damn code doesn't seem to care! Stil NO-GO for the analogRead command!
The code itself is quite simple as far as analogReading goes.

Could it be a bug elsewhere?
Could it be I am so stupid I am overlooking something trivial?
 :-/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, how does the AVG discriminate between pin1 as digital pin (physical chip pin3, PB1)
 and pin1 as an analog pin1 (physical pin12, PA1)?
 :question
« Last Edit: June 04, 2010, 07:05:18 am by BillGeo » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My bad!
I was leaving the AREF pin unconected. Thought there was an internal 5V supply (wasn't there?).

But my last question stands...
Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

S.C.  Thanks again for a greatly needed attiny core.  Not quite working for me yet though.
 
I did a fresh arduino-018 install and downloaded the attiny84-03 core.  did not make any other changes - correct?

when I try to do a sketch download (or burn the "bootloader") I get a message saying the device signature is incorrect(shows as 0's).  

Code:
Binary sketch size: 818 bytes (of a 8192 byte maximum)

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


Looking at the verbose output below it seems to me that the arduinoisp code is responding but the attiny84 is not.  I've double checked all the connections and they look right.  disconnecting sck, miso, or mosi all give the same error.  disconnecting reset gives a different error. Any thoughts?


Code:
Binary sketch size: 818 bytes (of a 8192 byte maximum)
C:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/bin/avrdude -CC:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny84 -cstk500v1 -P\\.\COM1 -b19200 -Uflash:w:C:\Users\Bill\AppData\Local\Temp\build5363555325787943731.tmp\tiny84mule.cpp.hex:i


avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Users\Bill\Desktop\parents 2009 taxes\arduino-0018\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM1
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: Recv:
         AVR Part              : ATtiny84
         Chip Erase delay      : 4500 us
         PAGEL                 : P00
         BS2                   : P00
         RESET disposition     : possible i/o
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Timeout               : 200
         StabDelay             : 100
         CmdexeDelay           : 25
         SyncLoops             : 32
         ByteDelay             : 0
         PollIndex             : 3
         PollValue             : 0x53
         Memory Detail         :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [81]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [98]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
avrdude: Send: A [41] . [84]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [85]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [86]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [87]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [89]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: Recv:
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Send: P [50]   [20]
avrdude: Recv:
avrdude: Recv:
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: u [75]   [20]
avrdude: Recv:
################################################## | 100% 0.05s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: Recv:

avrdude done.  Thank you.
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

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

BillGeo On the analog is a small error that will be fixed on the next release.
You can do this: analogReference(0); in setup.
This will use the internal aref. Now its indeed on external.

bill2009, do you use a 10K resistor parallel on the reset?


As you can see on the breadbord, the reset line (pin 1 on a atmega168) is hook on a resistor and the other side of the resistor has 5V. The green line is the reset to the arduinoISP.
Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
bill2009, do you use a 10K resistor parallel on the reset?

yes sir, brown-black-ORANGE from pin 4 of the attiny84 to ground and pin 4 goes to 10 of the driver.  i'll see if i have another chip i can try to program.
« Last Edit: June 04, 2010, 07:03:58 pm by bill2009 » Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Damn!
I seem to be geting the same error as Bill2009 does.

Code:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!

What't going on...

I'm going to delve into this! smiley-grin
Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!
that would reset the program running in the attiny84 - but there isn't one is there?
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
that would reset the program running in the attiny84 - but there isn't one is there?

No, there IS.
Thats the strange thing. I actually uploaded my sketch-code just fine using my Arduino-ISP and the core modification of the 0018 IDE.
And more than once for that matter.
After that... I can't remember what change I made and I get this error message.
I changed breadbords, for the bigger circuit, but other that that it seems the same to me.
(note that I get the same error using a USBtinyISP and avrdude, trying to just read the fuses.)

Could the reset pin be damaged (fuse set incorrectly.)
I just say that based on the fact that grounding the reset pin doesn't reset the code!
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
yes sir, brown-black-red

not to nitpick but that is 1k, maybe it is too weak

on my 84 setup I dont have a pull up resistor, works fine (keeping in mind its being powered by the arduino also, when powered externally and still connected to a ardiuno for programming yea its needed if the arduino is turned off)
« Last Edit: June 04, 2010, 06:43:21 pm by Osgeld » Logged


SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I manually tie it to ground... and there is no reset of the program!

reset does not happen until it goes high again, holding the reset down enables self programing through the isp port (avrisp for example)
Logged


ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 993
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Quote:
yes sir, brown-black-red

not to nitpick but that is 1k, maybe it is too weak

on my 84 setup I dont have a pull up resistor, works fine (keeping in mind its being powered by the arduino also, when powered externally and still connected to a ardiuno for programming yea its needed if the arduino is turned off)

It's a brown-black-orange - I just typed it wrong.  what a goof, thanks for noticing i'll fix the post.
Logged

Bill Rowe
Olduino - An Arduino for the First of Us
www.olduino.wordpress.com

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

Code:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84

I get this error as well, I don't know what it is, but never the less, it programs the chip, so it can be ignored. I also get the error using avr-dude, with a other ISP programmer, so its a fault in that.

I dont get the "cant find signature", i have reprogrammed it many times now with arduinoisp, with different sketches.
But maybe it is the lockbit, when buring the bootloader, it locks the chip for programming. Of course with a normal bootloader the chip is programmed from within, not for the attiny. So set de unlock and lockbit to 0xfc in boards.txt in de attiny84 folder.
Then reburn the bootloader. It keeps the chip unlockt now.


The RESET pin is not to reset the program inside, but it resets the whole chip. If the reset is HIGH(5v) the chip is running normal. Pulling the RESET LOW(gnd), the chip stays in RESET until the pin is HIGH again.

That why there is a 10K resistor between in, Because the ISP programmer sets the port LOW, but the reset is tied to 5v, that would cause a short circuit. Now with the 10K resister there wont be.
« Last Edit: June 05, 2010, 03:19:52 am by SuperCow » Logged

Pages: 1 ... 13 14 [15] 16 17 ... 19   Go Up
Jump to: