How to read logic signal?

Discussion in 'Embedded Systems and Microcontrollers' started by moorejohn90, Jul 8, 2012.

  1. moorejohn90

    Thread Starter Member

    Dec 9, 2011
    57
    0
    Hi, I know the way of reading digital signal with button (using pull-down resister with digitalRead) in arduino. Is there any way of reading logic signal from another digital pin of arduino or from other IC that can create logic signal something like TTL (pin 0,1 in arduino).
    Thanks
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,363
    You make no sense to me. Maybe someone else can figure this out or maybe you can rephrase your question.

    If it is already a digital signal why not just connect it to a digital input on the arduino?
     
  3. moorejohn90

    Thread Starter Member

    Dec 9, 2011
    57
    0
    Hi, I mean, I can read the input of digital signal(using pull down resister with button) with digitalRead function in arduino. I want to know it is also read digital signal signal (5v or 0v) that are sending from another pin of arduino. Something like read the changing stage of electric signal (0v or 5v) of pin 3 from pin4.
    Thanks.
     
  4. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,771
    971
    yes its the same thing as reading a button..
    BUT why? There is no need to read a digital signal from one pin to another because you already know if its high or low (5V or 0V) because you tell that pin to go high or low in the software.

    Its like raising your hand then having your other hand make sure your hand is raised.. No point...your brain knows it raised a hand already.
     
  5. moorejohn90

    Thread Starter Member

    Dec 9, 2011
    57
    0
    Hi, I asked the way of doing as I said before, because I want to receive signal from opto-transitor and normal transistor from arduino.
    Thanks:p
     
  6. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
  8. moorejohn90

    Thread Starter Member

    Dec 9, 2011
    57
    0
    Hi t06afre, that right, but I want to receive from another pin of arduino, not from supply voltage through button. And I also want to receive signal(on or off' Voltage) from photo-transistor or other types of transistor.
     
  9. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Digital I/O is sometimes used to power small sub-circuits, so why not read it back as well? There is some margin regards the H/L levels.
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    If one pin of the Arduino is defined as an output. And one or more pins are defined as inputs. It is nothing wrong in connecting these inputs to the latter output. However the most easy thing would be to just check the stutus of the output pin by reading the output register for that port. I do not use Arduino so I do not know this is done in a program
     
Loading...