PBP migration from 16F88 to 16F1827


Closed Thread
Results 1 to 21 of 21

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RussMartin View Post
    What thing(s) am I failing to do?
    Well, you failed to include the part that reads the A/D, "Manipulates" it, then outputs it to a pin.
    <br>
    DT

  2. #2
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    I didn't include anything else because (a) everything ran fine on the '88 and (b) one of the five identically-processed channels is working just fine.

    All five channels are handled like this (different VARs, of course) in a loop, with the interrupt enabled:

    FOR SAMPLX=4 TO 1 STEP -1
    ADCIN 2,INMD
    IF INMD>TEMPMD THEN TEMPMD=INMD
    NEXT SAMPLX
    INMD=TEMPMD
    IF MODE=1 THEN GOTO HOP3
    IF INMD>341 THEN
    INMD=(INMD-342)*3
    ELSE
    INMD=0
    ENDIF
    HOP3:
    IF INMD<10 THEN COMP=0
    IF INMD<THRES THEN INMD=THRES+INMD+COMP
    INMD=INMD+COMP
    IF INMD>1023 THEN INMD=1023
    TEMPMD=0
    XMD=INMD/2

    The INT_INT handler looks like this:

    STATE:
    FOR INDEX=511 TO 1 STEP -1
    IF INDEX=XLO THEN OLO=1
    IF INDEX=XLM THEN OLM=1
    IF INDEX=XMD THEN OMD=1
    IF INDEX=XMH THEN OMH=1
    IF INDEX=XHI THEN OHI=1
    NEXT INDEX
    OLO=0 : OLM=0 : OMD=0 : OMH=0 : OHI=0
    @ INT_RETURN
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP, 16F1827, FSR, and Error 113
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th January 2014, 09:04
  3. Can PBP & 16f88 really do 9600,8,E,1
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 7th November 2010, 12:12
  4. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

Members who have read this thread : 2

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