Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Programming Questions / Re: program does not start when supplied with external power on: September 05, 2014, 12:41:12 am
Can you tell us which SD library worked for you? I am having the same problem with a Seeed SD shield V4 on Arduino Uno R3.

Thanks in advance!

Sure. It was that one here: https://github.com/adafruit/SD/archive/master.zip
It's got a small footprint and is stable/reliable.
2  Using Arduino / Sensors / Re: Load Cell U2A with INA 125P on: August 30, 2014, 01:55:42 pm
Is it possible for you to try another INA 125 ? Maybe it's killed already.
3  Using Arduino / Sensors / Re: Load Cell U2A with INA 125P on: August 30, 2014, 12:24:05 am
Hi,
you use 1 kOhm resistor for Rg. That might be too high. Try using a smaller one like 50 ... 400 Ohms.
Regards, AgeBee
4  Using Arduino / Sensors / Re: Dallas temperature sensor DS18S20 with the ATmega32-16PU on: May 19, 2014, 03:21:42 pm
Thanks michinyon for your explanation.

No, there is no output about that it detected a one-wire device.

Just a remark for my setup.
I use an UBSTinyISB to flash the controller which is an ATmega32-16PU and you find the corresponding datasheet here: http://www.atmel.com/Images/doc2503.pdf

When I looked at your answer I think you mixed up the ATmega32-16PU with the ATmega328P. The latter uses PD0 and PD1 for RX/TX, respectively and is used within the Arduino.
5  Using Arduino / Sensors / Re: Dallas temperature sensor DS18S20 with the ATmega32-16PU on: May 18, 2014, 11:31:58 pm
No, that didn't help.
When I use ...

Code:
#define ONE_WIRE_BUS 12

and connect it to pin #12 there is no response.

I tried it with other pins, for example #0, #1 without success.

When you take a look into the pins_arduino.h of the mega32 library which I use you see the following array:

Code:
const uint8_t PROGMEM digital_pin_to_port_PGM[32] = {
PB,  // PB0 ** D0
PB,  // PB1 ** D1
PB,  // PB2 ** D2
PB,  // PB3 ** D3
PB,  // PB4 ** D4
PB,  // PB5 ** D5
PB,  // PB6 ** D6
PB,  // PB7 ** D7
PD,  // PD0 ** D8
PD,  // PD1 ** D9
PD,  // PD2 ** D10
PD,  // PD3 ** D11
PD,  // PD4 ** D12
PD,  // PD5 ** D13
PD,  // PD6 ** D14
PD,  // PD7 ** D15
PC,  // PC0 ** D16
PC,  // PC1 ** D17
PC,  // PC2 ** D18
PC,  // PC3 ** D19
PC,  // PC4 ** D20
PC,  // PC5 ** D21
PC,  // PC6 ** D22
PC,  // PC7 ** D23
PA,  // PA7 ** A0 D24
PA,  // PA6 ** A1 D25
PA,  // PA5 ** A2 D26
PA,  // PA4 ** A3 D27
PA,  // PA3 ** A4 D28
PA,  // PA2 ** A5 D29
PA,  // PA1 ** A6 D30
PA,  // PA0 ** A7 D31
};

Now you can see why I suspected that it has to be pin # 18 at the ATmega. D12 is mapped to PD4 which is pin #18 at the ATmega.

It seems that there is another reason why it does not work.
6  Using Arduino / Sensors / Re: Dallas temperature sensor DS18S20 with the ATmega32-16PU on: May 18, 2014, 12:02:21 am
you need to tell the software which pin you connected to .   12 or 18 ?

When I use the famous blink sketch and put it like this ...

Code:
int led = 12;

... it blinks. So, I think the software already got the right pins.

Or, whereabout in the code is it necessary ?
7  Using Arduino / Sensors / Dallas temperature sensor DS18S20 with the ATmega32-16PU on: May 17, 2014, 02:26:32 pm
Hello,
I want to use the ATmega32-16PU together with a Dallas temperature sensor DS18S20.
I connected the data line of the DS18S20 to PIN 18. Within the code I use:

Code:
#define ONE_WIRE_BUS 12

See attached sketch. It's the the one that comes with the Arduino Library for Dallas Temperature ICs.

The answer I get on serial is the following:

Requesting temperatures...DONE
Temp C: -127.00 Temp F: -196.60


Whe I pull out the data line I get the following answer:

Requesting temperatures...DONE
Temp C: 0.00 Temp F: 32.00


So I know at least it's the right pin.

I know the sensor is ok because I checked it with an Arduino UNO just after the trial with the ATmega32-16PU.

Are there any incompatibilities with OneWire or is it the wrong port I used at the ATmega32-16PU ?

Thanks for your help.
Regards, AgeBee
8  Using Arduino / Microcontrollers / Re: pin mapping of the ATmega32-16PU on: May 12, 2014, 03:19:36 pm
Thanks CrossRoads for your quick reply.
My fault was that I looked up D31 in the picture and thought that this is the pin I have to hook up the input of the poti.

I should have looked up the line where it reads

Code:
PA,  // PA1 ** A6 D30

in pins_arduino.h (line 129) seeing that this the one before the last which is physical pin 39 (PA1).
9  Using Arduino / Microcontrollers / pin mapping of the ATmega32-16PU on: May 12, 2014, 10:11:44 am
Hi,
I would like to get your help on the pin mapping of the ATmega32-16PU.
I use the library from here https://github.com/HolgerGross/ATmega32-Arduino together with the an USBTinyISB to program this processor with the attached sketch.
My hardware setup is pretty easy (see attached picture).
There is a LED attached to pin 19 of the ATmega32-16PU and a potentiometer attached to +5 V and ground with the slider going to pin 39. I can now adjust the blink rate.
However, that does not match with the pin mapping which I find the pins_arduino.h which reads like this:
Code:
/*
                        ATMEL ATmega32
   
                          +---\\---+
     (XCK/T0) D0 PB0 01|        |40  PA0 AI7 D31 (ADC0)
         (T1) D1 PB1 02|        |39  PA1 AI6 D30 (ADC1)
  (INT2/AIN0) D2 PB2 03|        |38  PA2 AI5 D29 (ADC2)
  (OC0/AIN1) D3 PB3 04|        |37  PA3 AI4 D28 (ADC3)
       (SS) D4 PB4 05|        |36  PA4 AI3 D27 (ADC4)
     (MOSI) D5 PB5 06|        |35  PA5 AI2 D26 (ADC5)
     (MISO) D6 PB6 07|        |34  PA6 AI1 D25 (ADC6)
      (SCK) D7 PB7 08|        |33  PA7 AI0 D24 (ADC7)
                 RESET 09|        |32  AREF
                   VCC 10|        |31  GND
                   GND 11|        |30  AVCC
                 XTAL2 12|        |29  PC7 D23 (TOSC2)
                 XTAL1 13|        |28  PC6 D22 (TOSC1)
          (RXD) D8 PD0 14|        |27  PC5 D21 (TDI)
          (TXD) D9 PD1 15|        |26  PC4 D20 (TDO)
        (INT0) D10 PD2 16|        |25  PC3 D19 (TMS)
        (INT1) D11 PD3 17|        |24  PC2 D18 (TCK)
        (OC1B) D12 PD4 18|        |23  PC1 D17 (SDA)
        (OC1A) D13 PD5 19|        |22  PC0 D16 (SCL)
        (ICP1) D14 PD6 20|        |21  PD7 D15 (OC2)
                          +--------+
*/

Why is the pin number in the sketch (const int potPin = 31;) not pin 40 at the ATmega32-16PU ?
Thanks for your help in advance.
Regards, AgeBee
10  Using Arduino / Microcontrollers / Re: Arduino Micro with XBee on: April 12, 2014, 03:19:47 pm
Found the solution !
Since the Arduino Micro is connected through a USB cable I can't use PINs 0 and 1 since the USB uses them.
I used SoftwareSerial to get me two other PINS, 8 and 9.

Code is like this, I used a LED to check optically.
Code:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8); // RX, TX

int led = 13;

void setup() {               

  while (!Serial);

  pinMode(led, OUTPUT);   
  Serial.begin(9600); 
  mySerial.begin(9600);
}

void loop() {
  digitalWrite(led, HIGH);   
  mySerial.println(millis());
  delay(1000);               
  digitalWrite(led, LOW);   
  Serial.println(millis());
  delay(1000);
}
11  Using Arduino / Microcontrollers / Re: Arduino Micro with XBee on: April 12, 2014, 02:39:57 pm
Two remarks:
1) I made a mistake in the coding. It must read:

Code:
while (!Serial) ;

However, this  does not change the result, i.e. I still can't see any output at the second XBee.

2) I see the TX LED flashing on the Arduino Micro.

So, it seems to me, that the data do not reach the XBee.
12  Using Arduino / Microcontrollers / Arduino Micro with XBee on: April 12, 2014, 05:40:17 am
Hi,
I can't get an XBee talking when hooked up to the Arduino Micro. I know this because I do not see another XBee at another computer listening to the one connected to the Micro.
I use an XBee Pro S1 connected to the Arduino Micro as shown in the picture attached.


When I connect the XBee with the Arduino UNO it works perfectly and I see the output on another computer. So this is the evidence I connected it properly.
I changed TX and RX already without effect. And I use the line ..

Code:
while (!Serial) {};

recommended for the Arduino Micro.

Complete coding is as follows:

Code:
void setup() {
  Serial.begin(9600);
  while (!Serial) {};   
}

void loop()
{
 Serial.println(millis());
 delay(1000);
}

I suspect here some specialities with the Arduino Micro.

Thanks for your help.
Regards, AgeBee
13  Using Arduino / Microcontrollers / Re: ATMega328P-PU with the USBTinyISB on: April 10, 2014, 01:41:34 pm
Hi Ray, mrburnette, mart256,

With Rays ...
ATmega328 on a breadboard (16MHz Xtal)

... I get the answer:
avrdude: stk500_recv(): programmer is not responding

With Rays ...
ATmega328 on a breadboard (8 MHz internal clock)
... I get the answer:
In file included from Blink.ino:10:
Arduino.h:213:26: error: pins_arduino.h: No such file or directory

With my entry mentioned above I get:

avrdude: Error: Invalid -P value: '/dev/ttyS4'
         Use -P usb:bus:device
         
However, I get it on the chip with the command line version:
sudo ./avrdude -c usbtiny -C avrdude.conf -p m328p -U flash:w:Blink.cpp.hex

The quartz and the two capacitors were necessary, however it was not necessary to use the 10 k pull-up from RESET to Vcc. It worked with and also without the resistor. The RES of the USBTinyISB was directly connected to PIN 1 of the ATMega328.

So it seems to me that the problem is in the boards.txt where I do not use the prober values.

Nevertheless it works now.
I'll still keep on working for a solution with/over the Arduino.
Thanks guys for your kind help.
Regards, AgeBee
14  Using Arduino / Microcontrollers / Re: ATMega328P-PU with the USBTinyISB on: April 10, 2014, 12:13:24 am
Hi,
thanks mart256 and Ray for your interest in my problem.

@mart256:
The programmer powers the chip up, yes, that's correct and I wired it up as you described it. PIN 7 and PIN 20 with Vcc and PIN 8 and 22 with GND.
However, I did not use a 10k pull-up resistor for the RESET PIN. I connected it directly to RESET of the ISB 6-pin header (PIN 5). Could this be the solution ?
And yes, the chip flashes properly within the Arduino UNO. In one of my tries I used a 16 MHz quartz together with two capacitors to GND. But this did not help.

I'll try two things tonight. First, the 10 k pull-up resistor and then the 'direct' flash with avrdude, i.e. not using the Arduino UNO between it. Just your posted command line.

You suggested erasing it beforehand. This works with the -e switch, right ?

@Ray:
I got me the USBTinyISB because it was said that it works flawlessly. Actually it did and I can remember using it for the ATMega328 nearly two years ago with the Arduino IDE 1.0.0. But since then a couple of things had changed (at least my operating system, Arduino IDE).

Regards, AgeBee
15  Using Arduino / Microcontrollers / Re: ATMega328P-PU with the USBTinyISB on: April 06, 2014, 12:16:43 am
Ray,
thanks for posting me your settings but neither one did help.
When I used your 'internal' breadboard ATmega328 settings I get the error:

Arduino.h:213:26: error: pins_arduino.h: No such file or directory

When I use the ATmega328 on a breadboard (16MHz Xtal) I get:

avrdude: stk500_recv(): programmer is not responding

There must be one setting which prevents reaching my ATMega328.
BTW, I took another chip and tried with that one. Same negative result. The chip however could flawlessly flashed within an Arduino UNO.

I will keep on searching and let you know when I found a solution.
Regards, AgeBee
Pages: [1] 2 3 4