+ Reply to Thread
Results 1 to 9 of 9

Thread: Connect two AVR

  1. #1
    kemo0o Newbie
    Join Date
    Feb 2008
    Posts
    45

    Default Connect two AVR

    Hey

    i am working for some big project and i have Consume all pins

    So i want to use another AVR The question that how i can connect them together one Master and The other slave??


  2. #2
    dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent dknguyen Excellent
    Join Date
    May 2006
    Location
    Alberta, Canada
    Posts
    6,028

    Default

    Quote Originally Posted by kemo0o
    Hey

    i am working for some big project and i have Consume all pins

    So i want to use another AVR The question that how i can connect them together one Master and The other slave??
    It'd be simpler (coding especially) to just use a bigger microcontroller. But to answer your question you connect can their SPI ports together but then you have to deal with all the coding for them to understand each other- something you don't have to do if you just use a bigger chip.

  3. #3
    kemo0o Newbie
    Join Date
    Feb 2008
    Posts
    45

    Default

    in my country only 40-pin is available ^_*
    So i must use it

  4. #4
    penoy_balut Newbie
    Join Date
    Sep 2006
    Location
    Bagong Silang
    Posts
    171

    Default

    you can also do multiplexing to save on pins

  5. #5
    kemo0o Newbie
    Join Date
    Feb 2008
    Posts
    45

    Default

    Quote Originally Posted by penoy_balut
    you can also do multiplexing to save on pins
    its agood idea

  6. #6
    Papabravo Excellent Papabravo Excellent Papabravo Excellent Papabravo Excellent Papabravo Excellent Papabravo Excellent Papabravo Excellent
    Join Date
    Mar 2006
    Location
    Michigan, USA (GMT-5)
    Posts
    2,892

    Default

    External Latches(74HC374, 74HC259) can be used for outputs. Multiplexers(74HC257) can be used for inputs. Analog switches(74HC4066) can be used for analog inputs. You can also use either type of shift register, PISO or SIPO for inputs and outputs, and you can find peripherals with SPI or I2C interfaces. I guess the schools in your country neglect to mention the basics, which is why only 40 pin chips are available there.
    Last edited by Papabravo; 2nd March 2008 at 01:10 PM.
    We never have time to do it right; but we always have time to do it over.

  7. #7
    ikalogic Good ikalogic Good ikalogic Good
    Join Date
    Dec 2003
    Location
    Limoges, France
    Posts
    632

    Default

    Quote Originally Posted by kemo0o
    Hey

    i am working for some big project and i have Consume all pins

    So i want to use another AVR The question that how i can connect them together one Master and The other slave??

    I really encourages you to use the USART. (which is the synchronous UART!) this way you don't have to deal with baude rates, etc, just connect tow micro controllers working at the same frequency, send data bytes from here to there, and build a routine to handle those data bytes.

    I built that system with two 89s52's, and it worked perfectly, One of them was the master, and the other handeled all the line following and motor control issues, in the line follower robot (that you know about, since i was in the same university you are in now!! )
    Ibrahim Kamal
    check my electronics and robotics page: http://www.ikalogic.com/

  8. #8
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,759

    Default

    Really the question is far too vague to answer, specific requirements have specific solutions, and there's no specific information given here.

    To give one specific example, you might have a need to scan a multiplexed keypad?, which uses a considerable number of I/O pins, so you could use a separate processor to do the scanning, and a single pin serial connection to the main processor.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  9. #9
    kemo0o Newbie
    Join Date
    Feb 2008
    Posts
    45

    Default

    Quote Originally Posted by ikalogic
    I really encourages you to use the USART. (which is the synchronous UART!) this way you don't have to deal with baude rates, etc, just connect tow micro controllers working at the same frequency, send data bytes from here to there, and build a routine to handle those data bytes.

    I built that system with two 89s52's, and it worked perfectly, One of them was the master, and the other handeled all the line following and motor control issues, in the line follower robot (that you know about, since i was in the same university you are in now!! )
    Thanks for This answer
    i will use it really
    when i finish i will told u
    thanks for help

+ Reply to Thread

Similar Threads

  1. AC Voltage Meter
    By pursang in forum General Electronics Chat
    Replies: 11
    Latest: 27th January 2008, 01:34 PM
  2. Unable to connect to Inchworm
    By Hedos in forum Micro Controllers
    Replies: 15
    Latest: 23rd December 2006, 03:26 PM
  3. How to connect AT8051 and AT28c256 ?
    By phamhoangdung in forum Micro Controllers
    Replies: 1
    Latest: 7th August 2006, 04:52 AM
  4. Connect Battery and PSU at same time...?
    By grrr_arrghh in forum General Electronics Chat
    Replies: 3
    Latest: 9th July 2004, 11:20 PM
  5. Please Help. How connect Pass Transistors in (-) Regulator?
    By hamfiles in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 23rd June 2003, 06:27 PM

Tags for this Thread