problem with input and output (18F452)


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    TrisD = %00001000 ' all port d as outputs except bit 3 input
    TrisC = %01010000 ' all port c outputs except bits 6 and 4 inputs
    TrisA = %00000000 ' all port a as outputs
    TrisB = %11110000 ' lower 4 bits outputs upper inputs
    TrisE = %00000000 ' all 8 bits as outputs
    edit: Sougata undoubtly knows what he is talking about and posted while I was writing.
    Last edited by Archangel; - 17th March 2008 at 16:28.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    And make sure that all your DEFINE statements are in upper case, ie:

    Define LCD_DREG PORTD

    should be

    DEFINE LCD_DREG PORTD

    (Skimask & Bruce pointed this out to me last week!)

    Phil.

Similar Threads

  1. LED "capacitance" won't get lower
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 3rd May 2007, 20:31
  2. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts