What is the Pin Number for PortE.1? on 18F458


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Default

    See if ......
    Serout2 PortA.0[33] , 16390, ["Hello World"]
    .... will output data on PortE.1. If it does you should be able to access all pins on your pic.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I'll put money on the fact that you've not switched it into DIGITAL mode... PortE like PortA is muxed with the ADC...

  3. #3
    Join Date
    Oct 2004
    Posts
    46


    Did you find this post helpful? Yes | No

    Default Still a bit confused

    I have declared at the start of the code ADCON = 7 to switch Pins to digital mode. Now since the 18F458 is 40 Pin PIC perhaps the 7 is the wrong number.

    I've run the following code and have noted what works and what doesn't below.


    ADCON = 7
    PortPin Var Byte
    Pin16 Var PortE.1

    PortPin = Pin16

    Serout2 PortPin , 16390, ["Hello World"] ' this does not work

    Serout2 Pin16 , 16390, ["Hello World"] ' this works

    Serout2 Pin16 , 16390, [Dec Pin16] ' this spits out 0

    Serout2 Pin16 , 16390, [Dec PortPin] ' this spits out 0

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  5. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26

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