variable problems


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Unless you will be writing part of your program in Assembly Language, there's no need to worry about the PIC's banking system.

    PicBasic Pro handles all that for you.

    The access locations can be useful in ASM, and can save a bunch of CPU time by reducing the number of Bank changes. But PBP does not use that area, for that purpose.

    So just define your variables without ANY modifiers, and everything should work just fine.
    DT

  2. #2
    Join Date
    Jun 2008
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    So just define your variables without ANY modifiers, and everything should work just fine.
    I am using ASM for interrupt initialization, but I don't think that would matter as far as variables go. Actually that's the reason why I'm trying to learn about these modifiers; if I let Picbasic handle the variables, my board goes haywire, freezes up and doesn't hold the var values as debugging showed, however everything works if I manually set the vars to set locations.

    I don't know why this is happening, and maybe I coded something wrong or discovered a picbasic bug; not sure, but manually assigning a var to location, say, $70 that are accessed say at 0x0100 to 0x1EC0 address (in other words across all banks), works and letting picbasic handle this var doesn't work.

    Maybe someone has a suggestion actually what might be wrong.

    P.S. watchdog timer kicks in sometimes also because I notice a board reset and I have auto-insert clear watchdog timer set so that really does show that the board froze up.

    Thanks for any information.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Well, let's see some real code so we can help you figure out the real problem.

Similar Threads

  1. EEPROM Variables (EE_Vars.pbp)
    By Darrel Taylor in forum Code Examples
    Replies: 79
    Last Post: - 26th October 2012, 01:06
  2. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36
  3. WORD vs BYTE variable lengths
    By bartman in forum General
    Replies: 0
    Last Post: - 28th November 2005, 22:16
  4. Problems with variable - Advise welcome
    By tracking in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th June 2005, 19:40
  5. 2k barrier variable problems
    By khufumen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 21st December 2004, 00:35

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