2

Author Topic: Using all I/O on atmega8  (Read 1799 times)

0 Members and 1 Guest are viewing this topic.

Offline spizzakTopic starter

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 1
Using all I/O on atmega8
« on: July 18, 2009, 07:40:43 PM »
I saw that the datasheet for the atmega8 says it has a maximum of 23 i/o lines. If I wanted to keep the 6 pin connector for the programmer, how many I/O ports is it possible to use? And how can they be used? Working from the $50 robot design, I'm guessing I would need to solder on some more busses and connect header for the rest of the locations. Is there any more detailed info on how to do this anywhere?

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Using all I/O on atmega8
« Reply #1 on: July 18, 2009, 08:24:54 PM »
there are 11 digital I/O that are not being used by the programmer... 3 that are used by the programmer
(sck, mosi, miso) and then the 6 analogue I/O. look at the attached images for reference.
so the maximum I/O you can have without using the programming pins is 17 (6 analogue, 11 digital)
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: Using all I/O on atmega8
« Reply #2 on: July 18, 2009, 10:19:24 PM »
Technically it would be 17 digital pins, 6 of them being able to read analog voltages. It isn't good to think certain pins are analog and others are digital - all are digital, but some ports have certain features like interrupts, timers, and ADCs.

Offline tristantech

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: Using all I/O on atmega8
« Reply #3 on: July 29, 2009, 10:24:43 AM »
uhh... doesn't everybody know that the avr's analog and programming pins can be used a regular I/O pins?
Hey! Visit my website @ http://www.tristantech.net

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: Using all I/O on atmega8
« Reply #4 on: July 29, 2009, 11:08:57 AM »
uhh... doesn't everybody know that the avr's analog and programming pins can be used a regular I/O pins?

apparently not, or he wouldn't be asking the question.

like SmAsH and Razor both mentioned, it would be 17 pins.  And, for the Atmega8 any pin that can input or output (whether digital or analog) can be used as a digital I/O pin.  Some of these pins may also have special features which they can be used for.  For example, some pins can read analog values, and some pins can write PWM.
use the google.  it's your friend.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Using all I/O on atmega8
« Reply #5 on: July 29, 2009, 02:48:07 PM »
Quote
like SmAsH and Razor both mentioned, it would be 17 pins.
20 if you count sck, miso and mosi ;)
Howdy

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: Using all I/O on atmega8
« Reply #6 on: July 29, 2009, 08:16:55 PM »
Quote
like SmAsH and Razor both mentioned, it would be 17 pins.
20 if you count sck, miso and mosi ;)
counting was never my thing, once i get past 10 i'm sunk, unless i'm wearing sandals ;)
use the google.  it's your friend.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Using all I/O on atmega8
« Reply #7 on: July 30, 2009, 12:42:23 AM »
Quote
like SmAsH and Razor both mentioned, it would be 17 pins.
20 if you count sck, miso and mosi ;)
counting was never my thing, once i get past 10 i'm sunk, unless i'm wearing sandals ;)
i didn't get the sandals part?
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: Using all I/O on atmega8
« Reply #8 on: July 30, 2009, 02:43:55 AM »
Sandals are open toed  ;)

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Using all I/O on atmega8
« Reply #9 on: July 30, 2009, 05:40:22 AM »
ah, lol... i see what you did there... nice...
Howdy

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: Using all I/O on atmega8
« Reply #10 on: July 30, 2009, 06:51:19 AM »
i made a funny....
now this thread gets trashed with continuations of i can't count jokes.  at least we answered the question first
use the google.  it's your friend.

 


Get Your Ad Here