* Analog and Digital


Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Aug 2008
    Posts
    81

    Default * Analog and Digital

    Hello

    And you need to set up 2 analog ports and 4 digital ports
    Analog ports work well the buttons do not work
    I am in doubt about the configuration of adc
    Can anybody help me
    About this
    Here the schematic of pic18f2550
    clear
    DEFINE OSC 48
    define LOADER_USED 1 'USB carregador de inicialização
    define RESET_ORG 1000h

    '--- Setup ADC -------------------------------------------------------------
    TRISA=%11111111:PORTA=%00000000
    TRISB=%00000011:PORTB=%00000000
    TRISC=%11000010:PORTC=%00000000
    ADCON1= %00001100
    ADCON2.7 = 1 'Right-justify result in ADRESH:ADRESL
    Define ADC_BITS 10 'Set number of bits in result
    Define ADC_CLOCK 3 'Set clock source (3=rc)
    Define ADC_SAMPLEUS 50 'Set sampling time in uS
    Thank you
    Attached Images Attached Images  

Similar Threads

  1. Analog Digital Conversion ??
    By gunayburak in forum General
    Replies: 3
    Last Post: - 28th December 2012, 16:52
  2. analog and digital
    By lerameur in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th June 2008, 02:40
  3. digital to analog conversor
    By sirvo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd January 2008, 20:46
  4. PortA analog and digital IO
    By krohtech in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th November 2007, 02:25
  5. Digital to Analog Converter
    By kutsi in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 27th June 2007, 19:17

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