Pic16f628 Port Config


Closed Thread
Results 1 to 2 of 2
  1. #1
    actionplus's Avatar
    actionplus Guest

    Default Pic16f628 Port Config

    I have a question on configuring the ports on this PIC. Well, mainly just a port, which is PORTB.5. I would like to use this port as analog input.

    I delcared

    TRISB = %00000100

    and then tried to compile with the Pic Basic Pro but keep getting error with a ADCON0.

    Can someone help me with this?

    Thanks

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by actionplus
    I have a question on configuring the ports on this PIC. Well, mainly just a port, which is PORTB.5. I would like to use this port as analog input.

    I delcared

    TRISB = %00000100

    and then tried to compile with the Pic Basic Pro but keep getting error with a ADCON0.

    Can someone help me with this?

    Thanks
    1. Your Declaration for TRISB shows PortB.2 as an input

    2. The only analogue feature on a 628 is the analogue comparators on PortA

    Suggest you study the datasheet a bit further.
    Keith

    www.diyha.co.uk
    www.kat5.tv

Similar Threads

  1. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  2. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 17:20
  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. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26
  5. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 03:56

Members who have read this thread : 1

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