Arcicorsa / arduino-tiny

Automatically exported from code.google.com/p/arduino-tiny
Other
0 stars 0 forks source link

Receive function of SoftwareSerial library not working on an ATtiny84a #71

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. XBee modules in API mode 2, with XBee.h included in arduino file
2. Implement SoftwareSerial example using XBee.h as well
3. Upload to ATtiny chip using Arduino as ISP

What is the expected output? What do you see instead?
ATtiny84a can transmit using SoftwareSerial but shows no sign of receiving 
anything. Tested by sending received data back over ATtiny Tx pin to XBee and 
on to XBee arduino and shield. Check what was received on ATtiny by using 
serial monitor in combination with Serial.print code on arduino. Code 
transmitted and received by ATtiny sent at separate times obviously as full 
duplex not supported.

What version of the product are you using? On what operating system?
Arduino 1.0, Windows 7

Please provide any additional information below.

Can't find any details of anyone that hasn't managed to get this to work. Think 
it may be due to the combination of ATtiny, SoftwareSerial and XBee. Any help 
whatsoever would be greatly appreciated.

Original issue reported on code.google.com by dancinturkey123@gmail.com on 5 Nov 2012 at 6:42

GoogleCodeExporter commented 8 years ago
Is the ATtiny84 running from the internal oscillator or external crystal?

Original comment by arduino....@gmail.com on 5 Nov 2012 at 7:20

GoogleCodeExporter commented 8 years ago
I've burned the 8MHz bootloader using the Arduino IDE and so it's running from 
the internal oscillator at 8MHz.

Original comment by dancinturkey123@gmail.com on 5 Nov 2012 at 8:02

GoogleCodeExporter commented 8 years ago
From the factory, the oscillator is ±10%.  Past ±4.5% serial communications 
becomes unreliable; especially with "software serial".

I suggest ensuring the oscillator is tuned.

Original comment by arduino....@gmail.com on 5 Nov 2012 at 8:11

GoogleCodeExporter commented 8 years ago
But surely the transmission would be unreliable as well then? However, the 
transmission is working perfectly at a baud rate of 57600. The reception is not 
just unreliable it simply does not see anything on the Rx pin. Would it help if 
I attached the code I am using?

Original comment by dancinturkey123@gmail.com on 5 Nov 2012 at 8:16

GoogleCodeExporter commented 8 years ago
> The reception is not just unreliable it simply does not see anything on the 
Rx pin.

You've checked with an oscilloscope or logic analyzer?

Original comment by arduino....@gmail.com on 5 Nov 2012 at 8:27

GoogleCodeExporter commented 8 years ago
Sorry I didn't explain that very well. The signal that I am hoping to 'read' 
using SoftwareSerial is being fed into the Rx pin (confirmed using an 
oscilloscope) correctly. And is simply a stream of 24 bits. However, obviously 
if I was just using an Arduino I could use the serial monitor in the IDE to 
confirm the bit sequence that was being received is correct but since it is an 
ATtiny I can't use the serial monitor. Therefore, I have to find a way of 
confirming that the ATtiny is reading in the same bit sequence I am 
transmitting from my Arduino Uno. In order to do this I take the incoming 
bitstream on the Rx, write it to the SoftwareSerial Tx pin on the ATtiny and 
connect this to the Uno's Rx pin and check on serial monitor. However there is 
nothing transmitted from the ATtiny to the Uno and since I already know that 
the transmit function is working perfectly on the ATtiny this means that it is 
constantly reading a value of zero from the Rx pin even though the oscilloscope 
clearly shows that there is an input of 24 high bits.

Can I just say thanks very much for your help so far, it's good to get the 
opinion of someone else, think I'm getting tunnel vision from looking at the 
same problem for the past 8 hours straight.

Original comment by dancinturkey123@gmail.com on 5 Nov 2012 at 9:26

GoogleCodeExporter commented 8 years ago
When I say that nothing is transmitted from the tiny to the uno I meant that it 
is transmitting all zero bit vaues.

Original comment by dancinturkey123@gmail.com on 5 Nov 2012 at 9:28

GoogleCodeExporter commented 8 years ago
> but since it is an ATtiny I can't use the serial monitor

Sure you can.  Tiny Debug Serial and TinyISP will easily get you what you need.

Original comment by arduino....@gmail.com on 13 Nov 2012 at 8:00

GoogleCodeExporter commented 8 years ago
I am facing the exact same issue, have you fix it yet?? I'm still researching 
if I found something I get back here and post it.

Original comment by abraham...@gmail.com on 24 Sep 2013 at 8:53

GoogleCodeExporter commented 8 years ago
Buongiorno,
ho problemi con arduino uno r3 a settare l'ATtiny84a-PU
con il blink ho tentato più volte :

int led = 7;
void setup() {                
  pinMode(led, OUTPUT);     
}

void loop() {
  digitalWrite(led, HIGH);
}

Original comment by pastore....@gmail.com on 29 Jul 2014 at 7:51

Attachments: