Loading...
Pages: 1 ... 7 8 [9]   Go Down
Author Topic: SoftwareSerial with ATTiny84 using ATtiny library  (Read 15893 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
God Member
*****
Karma: 19
Posts: 683
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am confused too.
I think it would be a good idea if you describe your project in more detail. It is unclear how many and which pins you are expecting to use and for what purpose.

Just to be clear that we are talking about the same:

The Capacitive Sensing Library ned a sense and receive pin
http://playground.arduino.cc//Main/CapacitiveSensor?from=Main.CapSense

If you are using TinyISP and knockbang , the serial output form attiny is pin PB1 (physical pin 6) connected to pin pin 12 on the UNO,
This is also the reason why you should not use this pin as sense pin, as I tryed to explain

That leaves you with 2 pins (three if you use the reset pin)



« Last Edit: February 28, 2013, 09:10:41 am by Erni » Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 140
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am confused too.
I think it would be a good idea if you describe your project in more detail. It is unclear how many and which pins you are expecting to use and for what purpose.

Just to be clear that we are talking about the same:

The Capacitive Sensing Library ned a sense and receive pin
http://playground.arduino.cc//Main/CapacitiveSensor?from=Main.CapSense

If you are using TinyISP and knockbang , the serial output form attiny is pin PB1 (physical pin 6) connected to pin pin 12 on the UNO,
This is also the reason why you should not use this pin as sense pin, as I tryed to explain

That leaves you with 2 pins (three if you use the reset pin)





ok this is where I am confused. I have the capacitive sensor hooked up to the attiny not the arduino (maybe that is where the confusion is). you say "using 0 and 1 you are interferring with MISO" I don't see how that will interfere with MISO on attiny...? nor did I know it even had it.

Those sketches I have up there are both uploaded to the attiny, I have capacitive sensor on 0 and 1 of attiny. and reading serial from attiny on PB3 (I thought this was default, I have always used this and it used to work fine) going into Tx of arduino. But I also leave it plugged into the programming board, but not sure if this will cause any unexpected errors.

let me know if this clears it up or if its still confusing.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Denmark
Offline Offline
God Member
*****
Karma: 19
Posts: 683
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset




Quote
ok this is where I am confused. I have the capacitive sensor hooked up to the attiny not the arduino

So do I   smiley-grin

Quote
nor did I know it even had it.

It does, see the picture above

Quote
you say "using 0 and 1 you are interferring with MISO" I don't see how that will interfere with MISO on attiny...?

Look at the picture PB1 (or 1) is MISO used by TinyISP to communicate with your Arduino

Quote
I have capacitive sensor on 0 and 1 of attiny

Again 1 is MISO

Quote
and reading serial from attiny on PB3 (I thought this was default, I have always used this and it used to work fine)

No, the default is PB1 when you are using TinyISP.


If you use TinyDebugSerial, the default is PB3
« Last Edit: March 01, 2013, 07:41:10 am by Erni » Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 140
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset




Quote
ok this is where I am confused. I have the capacitive sensor hooked up to the attiny not the arduino

So do I   smiley-grin

Quote
nor did I know it even had it.

It does, see the picture above

Quote
you say "using 0 and 1 you are interferring with MISO" I don't see how that will interfere with MISO on attiny...?

Look at the picture PB1 (or 1) is MISO used by TinyISP to communicate with your Arduino

Quote
I have capacitive sensor on 0 and 1 of attiny

Again 1 is MISO

Quote
and reading serial from attiny on PB3 (I thought this was default, I have always used this and it used to work fine)

No, the default is PB1 when you are using TinyISP.


If you use TinyDebugSerial, the default is PB3


Ohhhh, I was confusing myself because I was using a different core last time. it definitely had a different pin, i made suggestions you made and all is well. thanks for your patience smiley everything is working as expected. so using TinyISP is 0 the serial in( like Rx on arduino)? this relationship kind of confuses me because I have output from attiny going into Tx of arduino, which I thought was transmit. I would expect it to go into Rx.
Logged

for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I would need some help to bring my ATTiny85 to life.

My goal is to establish a serial communication on my Tiny.
I've already spent long hours for looking a working solution but with no luck :/.

Tried various libraries, settings, pins .. so now I am stuck .
The scenario :

Arduino Bare - working fine
Uploaded a blinky sketch and that is working fine

Uploaded 2 kind of bootloaders (?) Various serial implementations.. I am confused smiley-sad Heeelp please.

I would be happy to start the whole process from the beginning because surely I missed something.. wrong bootloader, library..something..

Thanks !

Logged

Denmark
Offline Offline
God Member
*****
Karma: 19
Posts: 683
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can upload a working blink sketch to your Tiny, you should be able to use TinyDebugSerial, which is a one way communication.

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

void loop() {
  Serial.println("Testing..");
  delay(100);
}

The output from the tiny is pin PB3.

You the need a serial/usb converter to connect it to your computer/serial monitor

more on this:

http://www.ernstc.dk/arduino/tinycom.html

As you see you have other options:

1. TinyDebugSerial
2. SoftwareSerial
3. Use TinyISP and Tinyknockbang
4. Use TinyISP and Serial Relay
5. Use TinyISP and Nullmodem

Logged

Pages: 1 ... 7 8 [9]   Go Up
Print
 
Jump to: