Show Posts
Pages: [1] 2 3
1  General Category / General Discussion / Shamless plug :-) on: December 08, 2013, 09:03:25 pm
Actually I have nothing to do with this venture apart from supporting it with a contribution, but I have gained so much from open source over the years, I thought I would take the trouble to mention it.

http://www.indiegogo.com/projects/linux-voice/x/5604718
2  Development / Other Software Development / Re: Notepad++ User Defined Language for Arduino on: June 06, 2013, 12:44:33 am
Hi C2,

Things move on so fast, this is a nice middle ground, but you will out grow it.

Have a look at http://www.visualmicro.com/ using atmel studio, it also has a good special offer on the debugger at the moment, it's not perfect but, well worth a look.

All the best

Ian
3  Using Arduino / Programming Questions / Re: Push Button Debouncing improperly on: April 20, 2013, 11:52:53 pm
Hi,

Have you tried the bounce library just for a sanity check, http://playground.arduino.cc//Code/Bounce




All the best

Ian
4  Using Arduino / Programming Questions / Re: reading and writing pins on: April 20, 2013, 11:36:35 pm
Hi

Bit of hard work, start with a mulitmeter and map the pins, that is where I would start.

Each button one by one, on the keypad, going along the pins and map the key presses, once that is mapped out, it should be easier to see where you are going.

All the best

Ian
5  Using Arduino / Microcontrollers / Re: Atmel Studio 6 / JTAGICE 3 / Debugging Tools on: April 20, 2013, 09:46:17 pm
Hi Collin,

Well done, very good layout, I don't have a jtagice to test it with, but I am happy you did not give up conveying the information to the community.

Psst...(whisper off stage).... It is a community and sometimes answers seem a bit, hmm, not as good as you expect, you did well, persevered  and took advice rather than get upset(not like me), well done and good luck.

Ian 
6  Using Arduino / Microcontrollers / Re: Program Optiboot Using Atmel Studio 6 and JTAG ICE 3 on: April 20, 2013, 09:18:21 pm
Hi,

Seems a shame you gave up, you obviously consider it worth publishing and worthwhile to the community, so don't stop trying.  How about putting it in your public dropbox folder and sharing the link?

I would like to see it

All the best

Ian
7  Using Arduino / Microcontrollers / Re: Problems with optiboot and arduinoISP on: April 19, 2013, 09:17:13 pm
Hi

I am selecting the "[optiboot] Arduino  duemilanove or nano w/ ATmega328", as the boot loader comes with these board types, kind of assumed it would be the correct one, wait one upload..... yup, that has fixed the problem.

So to recap you flash the boot loader by selecting the target board as "[optiboot] Arduino  duemilanove or nano w/ ATmega328", but when you flash the sketch you select the "nano" :-) I should have tried nano but went off at a tangent with command line and everything else, it does make sense as I believe the optiboot loader is the bootloader used by the uno, still it was an educational few hours.

Thank you very much

Ian
8  Using Arduino / Microcontrollers / Re: Problems with optiboot and arduinoISP on: April 19, 2013, 08:32:03 pm
Hi,

Yes, just downloaded the optiboot zip file today

I have attached a .7z file, I think it is what you where after, let me know if you need anything else.

I feel I have done everything correct especially as I can burn a standard boot loader in the same manner, but then, it could still be me.

Thanks for taking a look

Ian
9  Using Arduino / Microcontrollers / Re: Problems with optiboot and arduinoISP on: April 19, 2013, 07:37:28 pm
Missed a bit of information

using a duemilanove with 328p as the ArduinoISP board
10  Using Arduino / Microcontrollers / Problems with optiboot and arduinoISP on: April 19, 2013, 07:23:59 pm
Hi,

I have been trying for a few hours to load optiboot 5.0 to an ATmega328p, using windows 7 with arduinoISP as the programmer, here is what I have tried so far.

Burn optiboot loader from arduino IDE, chip programmed and here is the tail of the message
Code:
avrdude: Recv: . [10]
# | 100% 30.15s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [ff]
avrdude: Recv: . [10]
avrdude: Send: V [56] . [ac] . [e0] . [00] . [cf]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [cf]
avrdude: Recv: . [10]
################################################## | 100% 0.05s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [cf]
avrdude: Recv: . [10]
################################################## | 100% 0.03s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.

When I try to then upload a sketch using the  [optiboot] duemilanove or nano w/ 328p board option I get a signature error

Code:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         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    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  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  4500  4500 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  4500  4500 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  4500  4500 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  4500  4500 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
                                  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

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [05]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [98]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
         Hardware Version: 3
         Firmware Version: 5.0
avrdude: Send: A [41] . [84]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [85]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [86]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [87]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [89]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [03]
avrdude: Recv: . [10]
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [05]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: B [42] . [86] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] . [80] . [04] . [00] . [00] . [00] . [80] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: E [45] . [05] . [04] . [d7] . [c2] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: P [50]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: AVR device initialized and ready to accept instructions

Reading | avrdude: Send: V [56] 0 [30] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: V [56] 0 [30] . [00] . [01] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
################avrdude: Send: V [56] 0 [30] . [00] . [02] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
################################## | 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: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.


Also using the same ArduinoISP setup I have tried
Tried a ATmega168 with optiboot 5.0 168 firmware, program & verify ok, arduino IDE gives the same error
I have tried optiboot version 4.4 on both an ATmega328 & 168, programs & verify ok, arduino IDE gives the same error
Programmed from the command line with avrdude 5.10 & 5.11, programs & verify ok, arduino IDE gives the same error
From the command line direct upload of blink hex file worked ok
Burned a standard boot loader from arduino IDE & command line both will now accept sketches from arduino IDE

It has to something I am missing be grateful for any pointers

Ian


11  Using Arduino / Programming Questions / String clarification on: April 17, 2013, 05:57:51 pm
Hi,

I keep finding references(a few new ones today alone), about not using String class because of a bug, if I understand correctly the problem was with memory allocation, am I correct in thinking this has been addressed in 1.0.4 release or is this something different?

Quote
ARDUINO 1.0.4 - 2013.03.11

[core]

* Fixed malloc bug (Paul Stoffregen)

I downloaded and ran Nick Gammon's test code and it seemed to run ok on 1.0.4

The other issue people seem to have with String class, is that it is wasteful and better achieved with cstrings, that I am off to do some research on, seems it should be well covered the amount of times it comes up without me wasting everyone's time and asking again.

All the best

Ian
12  Using Arduino / Programming Questions / Re: Can I use the Arduino BOARD to program Attiny85? on: April 17, 2013, 02:20:55 pm
Hi

Does this help

http://hlt.media.mit.edu/?p=1695

Cheers

Ian
13  Using Arduino / Programming Questions / Re: digitalWrite question on: April 17, 2013, 09:32:39 am
Quote
But, PORTC = xx11xxxx, where the values in the 6 of the 8 bits are not changed, and PORTC = 00110000, where all 8 bits are assigned new values, are quite different statements.

 smiley-red Yes of course, thank you, I was too focused on the little 'bits' and missed all the 'bits'

Thank you all for your patience.

Ian

14  Using Arduino / Programming Questions / Re: digitalWrite question on: April 17, 2013, 09:14:55 am
Hi,

Sorry, being a bit like a dog with a bone, it is probable, I lack the knowledge to put the question in the correct way.

from http://www.nongnu.org/avr-libc/user-manual/group__avr__sfr.html

Quote
#define _BV   (bit)      (1 << (bit))
#include <avr/io.h>
Converts a bit number into a byte value.

Note:
The bit shift is performed by the compiler which then inserts the result into the code. Thus, there is no run-time overhead when using _BV().

Then in pins_arduino.h (standard) we have

Code:
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};

const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
};

const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, /* 0 */
PD,
PD,
PD,
PD,
PD,
PD,
PD,
PB, /* 8 */
PB,
PB,
PB,
PB,
PB,
PC, /* 14 */
PC,
PC,
PC,
PC,
PC,
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(0), /* 0, port D */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(6),
_BV(7),
_BV(0), /* 8, port B */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(0), /* 14, port C */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
};


Which seems to indicate to me, provided the instructions :-

Code:
PORTC |= _BV( PORTC4 );
PORTC &= ~ _BV( PORTC5 );

where inline, the array would hold the same as

Code:
PORTC = xx01xxxxx;

I am not trying to be clever or trip anyone up, it's just that I wish to progress, therefore when I am told 'no they are not the same' I go away for hours and try to find out the reason.  It's not that I think the answer I am given is wrong, it's ME, I have missed the point!

I do feel I am being a terrible bore on this subject.

Best regards

Ian

 
15  Using Arduino / Programming Questions / Re: digitalWrite question on: April 17, 2013, 12:30:06 am
Hi,

Coding badly, I will try to clarify my question, is it the compiler that evaluates this?

Code:
PORTC |= _BV( PORTC4 );
PORTC &= ~ _BV( PORTC5 );

and if so would not the compiler also then evaluate

Code:
PORTC = 00110000;

to be the same?

A bit lost here, perhaps giving the compiler more intelligence than is deserves!
 

All the best

Ian






Pages: [1] 2 3