Most memory saving way for comparing 98 preset values with ADC input?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: Most memory saving way for comparing 98 preset values with ADC input?

    Does PBP provide a way to access Special Function Registers, like FSR0L, FSR0H, INDF0, etc., directly?
    yes there are a number of ways
    my favourite is

    timer0 var byte ext
    @timer0 = TMR0


    OR even

    myFSR var word ext
    @myFSR= FSR0L


    or inline asm

    @ FSR0L=22


    OR USING PBP MACRO

    PBPBYTE VAR BYTE
    PBPWORD VAR WORD

    @ MOVE?BB _PBPBYTE,FSR0L
    @ MOVE?WW _PBPWORD,FSROL
    Warning I'm not a teacher

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

    Default Re: Most memory saving way for comparing 98 preset values with ADC input?

    surprised no one pulled me up on this
    or inline asm

    @ FSR0L=22

    should be

    or inline asm

    or just

    FSR0L=22
    Warning I'm not a teacher

Similar Threads

  1. Manipulating ADC values....
    By dbachman in forum Code Examples
    Replies: 2
    Last Post: - 10th May 2016, 05:59
  2. ADC values above 4095 for 12 bit ADC
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 1st February 2015, 23:24
  3. ADC Max Impendance and Power saving
    By Michael Wakileh in forum Schematics
    Replies: 3
    Last Post: - 28th June 2009, 20:29
  4. Scaling ADC values
    By purkolator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th November 2007, 06:14
  5. Inverting Input Values
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st August 2005, 09:09

Members who have read this thread : 0

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