Pic16f877a


Closed Thread
Results 1 to 9 of 9

Thread: Pic16f877a

  1. #1
    JARI NETWORKS's Avatar
    JARI NETWORKS Guest

    Default Pic16f877a

    Who can tell me how the A/D converter works

    Iám a starter so plaese keep it simple

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    do a search for ADCIN to start.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JARI NETWORKS
    Who can tell me how the A/D converter works

    Iám a starter so plaese keep it simple


    There's a new website that just might be able to help you out.
    It's address is:
    www.google.com

  4. #4
    JARI NETWORKS's Avatar
    JARI NETWORKS Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask
    There's a new website that just might be able to help you out.
    It's address is:
    www.google.com

    WOW, Have you find that by your own

  5. #5
    JARI NETWORKS's Avatar
    JARI NETWORKS Guest


    Did you find this post helpful? Yes | No

    Default

    I like all this HELPFULL answers for BEGINNERS

    Thank you very much

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    JARI,

    Maybe if you were more specific with your question.

    Do you just want to read the analog voltage on a pin?

    Are you looking for an explanation about how successive approximation works?

    Or, are you trying to figure out why the program you've already written doesn't work?
    <br>
    DT

  7. #7
    JARI NETWORKS's Avatar
    JARI NETWORKS Guest


    Did you find this post helpful? Yes | No

    Default

    I want to know how I can read a analog voltage on a pin, and how to put this in
    a program so I can set a other pin high or low.

    Iám using pbp v2.44

    grtz Jan

  8. #8
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    You can read that in the manual which came to your version of PBP.
    Here then a smal example with no comment. Try to find the comment in the manual.
    Code:
    		
    			@ DEVICE PIC16F877A,XT_OSC
    			@ DEVICE PIC16F877A,BOD_OFF
    			@ DEVICE PIC16F877A,LVP_OFF
    			@ DEVICE PIC16F877A,CPD_OFF
    			@ DEVICE PIC16F877A,PROTECT_OFF
    		
    
    		
    		
    			DEFINE	ADC_BITS		8
    			DEFINE	ADC_CLOCK		3
    			DEFINE	ADC_SAMPLEUS	50
    			DEFINE	OSC 4
    			
    			ADCON1	=	%00000010	
    
    			TRISA		= %11111111
    			TRISB		= %00000000   
    			TRISC		= %10000001
    
    			LEDPIN		VAR	PORTB.0
    
    			VALUE0		VAR	BYTE
    
    			CLEAR
    			
    
    START:			ADCIN 0,VALUE0
    
    			IF VALUE0 > 127 THEN
    				LEDPIN = 1
    			ELSE
    				LEDPIN = 0
    			ENDIF
    
    			GOTO START
    			END

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JARI NETWORKS
    I want to know how I can read a analog voltage on a pin, and how to put this in
    a program so I can set a other pin high or low.

    Iám using pbp v2.44

    grtz Jan


    How about page 43 of the PBP manual?
    Duh....

Similar Threads

  1. PIC16F877A for application in mobile robot...
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th January 2009, 14:47
  2. Replies: 11
    Last Post: - 6th November 2008, 10:27
  3. Replies: 9
    Last Post: - 4th February 2008, 19:12
  4. communicating pic18f452 with pic16f877a
    By tamersoss in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th July 2007, 19:54
  5. PIC16f877-20 to a PIC16f877A I/P Disaster
    By andyf in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 21st November 2005, 17:11

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