EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Three input NOR gate in PIC

Three input NOR gate in PIC

|

Microcontroller › PIC › Three input NOR gate in PIC

  • This topic has 2 replies, 3 voices, and was last updated 10 years, 5 months ago by Ashutosh Bhatt.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 27, 2014 at 6:28 am #3329
    Noel Philip
    Participant

    Hey guys,

    I was wondering if  i could get some help with an assignment question we were given (in a very short span of time),The question is as follows :”Implement a three input NOR gate in PIC.Input pins are 33,35 and 37.(Connect three switches to input the biits) and the output pin is 21(connect an led to indicate the output)

    I tried using a simple code as follows,but when i check for a change in the SFRs during line wise debugging,I dont get a change as expected.

    CONFIG OSC = HS , OSCS = OFF
    CONFIG WDT = OFF
    CONFIG BORV= 45, PWRT = ON ,BOR = ON
    CONFIG DEBUG = OFF ,LVP =OFF ,STVR = OFF
    #INCLUDE <P18F452.INC>
    ORG 00H
    BCF TRISD,0
    SETF TRISB
    MOVLW B’10101000′
    MOVWF PORTB
    BTFSS PORTB,7
    BSF PORTD,0
    BTFSS PORTB,5
    BSF PORTD,0
    BTFSS PORTB,3
    BSF PORTD,0
    END
     
    Do advice
     
    November 28, 2014 at 4:15 am #12377
    AJISH ALFRED
    Participant

    Do you have a C code of the same? Could you please explain the logic which you are using in the code?

    November 29, 2014 at 2:54 pm #12381
    Ashutosh Bhatt
    Participant

    I dont see any conditional instructions in ur code
    I dont know any assembly language but
    the logic is u hv to use conditions like
    if else or case

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Lightbox circuit May 17, 2025
  • Fuel Auto Shutoff May 17, 2025
  • Kawai KDP 80 Electronic Piano Dead May 17, 2025
  • Python help with keystroke entries May 17, 2025
  • Do resistors fail like dominoes? May 17, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise