The Godfather talking
You think I am funny guy huh?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 10, 2024, 06:47:45 18:47


Login with username, password and session length


Pages: [1]
Print
Author Topic: config for adc in proton  (Read 6666 times)
0 Members and 1 Guest are viewing this topic.
arash
Active Member
***
Offline Offline

Posts: 111

Thank You
-Given: 2
-Receive: 0


« on: December 14, 2005, 03:50:21 03:50 »

Hi all.
Do you know how can i define Vref+ and Vref- in proton (Externall vref)
Logged
ABBOSE
Junior Member
**
Offline Offline

Posts: 37

Thank You
-Given: 26
-Receive: 21


« Reply #1 on: December 14, 2005, 12:13:04 12:13 »

I interface the internal AD converter with PIC 16F877 for some load measurement purpose.
Follow the following step.

        Device = 16F877
        XTAL 4
        ALL_DIGITAL = TRUE
        PORTB_PULLUPS = OFF      ' Enable PORTB pull-ups
 
       ADIN_RES   8            ' Set the AD resolution to 10
      ADIN_TAD   32_FOSC   'FOR AD CLOCK SEE PROTON HELP FOR MORE DETAILS               
       ADIN_STIME   200                 ' Allow 100us for charge time, see proton help
     Dim RAW       as byte

TRISA = %11111111   ‘ All port a in
TRISB = %00000000   ‘All portb out

ADCON1 = %0000001   ' Set PORTA analog and right justify result

         ‘ set vref and input of AD for more see PIC data sheet 3029b for 16f877

st:
      RAW = ADIN 0
      PORTB = RAW
      DELAYMS 1000
      goto st
      End

ABBOSE
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC