Pages: [1]   Go Down
Author Topic: Softserial and atmega8  (Read 1229 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, I'm creating a project with 3 simultaneous rfid readers, getting data via Softserial. I've got it working with my Uno, and am trying to find a way to make it into a standalone thing.
For the rfid readers I need 6 pins (Tx + Rx )x3 (duh!) so I can't use the tiny85 I normally use for standalone stuff.
Maybe I'm saying a dumb thing here, but from what I understand, softserial operates with external interrupts. I have some atmega8 lying here, but from the specs on the atmel website the atmega8 supports 2 external interrupts, so it wouldn't be enough for what I need.
The attiny84 should work, but before buying some, I wanted to make sure there is no way the atmega8 would work (maybe I'm understanding softserial totally wrong) and thought of checking up with you guys. I need at least 8kb mem (sketch is roughly 7k) and those rx+tx ports I said before, so if there is any other better solution for the chip, let me know.

Thanks a lot!
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe I'm saying a dumb thing here, but from what I understand, softserial operates with external interrupts.

Pin change interrupts not external interrupts.  Software Serial works on any pair of pins.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, but according to Atmega8 datasheet this uC does not seem to have PCINT (pin change interrupt pins). Atmega328 has many.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Yup.  No pin change interrupts for the ATmega8.
Logged

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

Oh, pin change interrupts. Ok, I was right to think I was understanding it wrong smiley-razz

So, actually, the attiny85 would work, since it has 6 pins with PCINT capability, right?

Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, actually, the attiny85 would work, since it has 6 pins with PCINT capability, right?

Yes with some caveats...

• RESET has to be disabled for PB5 to be used as an I/O pin

• Once RESET is disabled, SPI programming is no longer available.  You can use either "high voltage" programming or a bootloader.

• To restore RESET you have to use high voltage programming

• PB5 is included in the Tiny Core pin mapping.  I have no idea if it's included in the MIT HLT pin mapping.  If you are using the HLT pin mapping you may have to add PB5.
Logged

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

I almost always use arduino to burn bootloader and upload sketches to the tinys (just made a pcb with fast connections, only have to change the ic smiley-razz)

Can you link me to the tiny core files, please? I've been using the mit cores.

And thanks a lot again, saved me a lot of time and some money too hehe
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I almost always use arduino to burn bootloader and upload sketches to the tinys (just made a pcb with fast connections, only have to change the ic smiley-razz)

Before you commit to the ATtiny85 processor I want to make certain you understand.  I'll start with some questions regarding your ATtiny work...

• When you "burn bootloader", is your intent is to change the fuse settings?

• Are you using an Arduino board running the ArduinoISP sketch to upload?  If not, what are you using?

• I know there is an actual bootloader for the ATtiny85.  Have you downloaded it or were you given a copy by someone?


Quote
Can you link me to the tiny core files, please? I've been using the mit cores.

http://code.google.com/p/arduino-tiny/


Quote
And thanks a lot again, saved me a lot of time and some money too hehe

You are welcome.
Logged

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

I'm using the arduino ISP sketch, yes. Until now I've never had to change fuse settings, I'm just using the core files from MIT and uploading the sketches I've run on the Uno before (of course I take care of what instructions work on the tiny).
When I talk about bootloader, I mean the "burn bootloader" command on the arduino ide, before uploading any sketch to the tiny.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using the arduino ISP sketch, yes.

The ArduinoISP sketch uses SPI to program the target.  After disabling RESET you will not be able to use the ArduinoISP sketch to make any changes to the target including changing the fuses.  Unless you have a high voltage programmer, disabling RESET is a one way path.  If you first install a bootloader, you will still be able to upload sketches but you will not be able to make any other changes to the target.

In other words, if you did not first install an actual bootloader the target will be "bricked" until you have access to a high voltage programmer.


Quote
When I talk about bootloader, I mean the "burn bootloader" command on the arduino ide, before uploading any sketch to the tiny.

You will have to install an actual bootloader before disabling RESET.  I suggest you first try installing and using a bootloader before taking that final step of disabling RESET.
Logged

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

Hummmm ok, I will do so. How should I do that?
"Manually" with avrdude? Never actually tried to do that. And what kind of connection should I get? USB to TTL is also SPI, right?
Logged

Pages: [1]   Go Up
Jump to: