trying to decide on pbp


Closed Thread
Results 1 to 36 of 36
  1. #1
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default trying to decide on pbp

    Hi all,

    So sorry if this is not the correct section to post. It looks like most of this forum is tech based (which is great) but I have a preliminary question.

    I have always programmed in asm, way back I programmed with basica (dating myself?). I have always loved basic and never bothered to learn C or VB for that matter.

    Heres my question: Having never used a complier other than asm, will I notice any uP performance differences for the worse? I mostly do hobby things like read encoders and drive multiple steppers and such. Also mess with R/C things (talking to servos, esc and listening to Rx).

    My only concern is timing and such. Now before I get blasted with the usual kind of questions like " can you tell us specific requirements ", I am just looking for decision making ideas. I know no one will be able to wave a magic wand or look into a crystal ball for me, just looking for some insight.

    I realize I will love things like if_then_elseif and REAL math functions and way easy array handling. But should I worry about timing stuff?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Welcome to the forum.

    One of the nice things about PBP is ASM can be mixed in with it. Here is a perfect example
    http://www.picbasic.co.uk/forum/showthread.php?t=3251
    The above should take care of just about any interrupt timing issues you come across.

    PBP has many commands that go back to BS1 (basic stamp) comparability and some of those do take up a little more code space and may take an extra cycle or so but no more so than poorly written ASM or C (IMHO).

    In the end it is the person banging on the keyboard that makes the most difference.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    thanks Dave, both for the info and the quick response. What you say makes perfect sense, I suppose I will go ahead and pull the trigger. I think I was just worried cuz I spend lots of time doing stuff like counting instructions to make sure loops are not too long and such.

    I started with a BS1, and as soon as I got away from the 200uS executes, I haven't looked back. Maybe thats what was spooking me. But as I remember, BS had built in interpretor, so hence long execution time.

    First project will be 16F1946 interface card for parallel port to steppers, also handling limit switches, homing and such.

    You are right, its really up to the keyboard bangger.

    P.S.
    Does PBP come with safety glasses or do I need to buy them elsewhere?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    You will need to supply the glasses

    Have you tried the PBP demo yet? Then you can see how it works.
    At complie time PBP converts your code to ASM. The ASM is tricky to read because of the macros used but that is a good thing?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Have you tried the PBP demo yet? Then you can see how it works.
    At complie time PBP converts your code to ASM. The ASM is tricky to read because of the macros used but that is a good thing?
    Just did download the demo, haven't really played with it yet. As for the tricky ASM, I guess its a good thing if it teaches me tricky programming skills

    I went ahead and ordered it last night, now just waiting on the goodies to arrive. I am sure I will be very happy with it, just being a chicken s***.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Hi CNCMG

    Having been Playing with R/C stuff for ... some years ... I can tell you PBP is a real Handy tool, and most of the time ... no assembler programming required.

    The best advantage, I think, is a truly compact and reliable code ... with very short debugging time. ( if any time even necessary ...).


    IF I had to find something weak ...

    Let's say the lack of Whisle and Bells features like universal libraries for GLCD and so on, where 8 bits processors begin to show their limits ...

    May be Real time processing stuff ... but it is a common weakness for PURE basic programming.

    Most of time, a nicely structured program does it without pain.

    PBP + assembler knowledge is the winning cocktail ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default More questions

    If I need to be patiant and wait for the manual, feel free to tell me. Otherwise heres my next question.

    How do you folks suggest I setup my work flow? By this I mean, I hace ICD3 (and ICD2) and am clearly used to working in mplab.

    Am I now gonna want to work in a new IDE or add plugin to mplab or something else? I would normally just type my asm program in mplab, compile, program/debug, and done.

    I know I can read the manual online here somewhere, but it doesn't feel like I saw a clear as mud answer last night while reading.

    On a different note, will i always need to answer the random question or does it go away after some number of posts?

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Being you are comfortable with MPLAB I would stay with it.
    http://melabs.com/support/mplab.htm

    The random question never goes away.... But there are only about six "randoms"
    Dave
    Always wear safety glasses while programming.

  9. #9
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    CNCGuy,

    Also, you can watch the next video to get you started. The video also has some nice tips and tricks. Ignore the LABX-1 Experimenter Board part if you are not planning on using it.

    http://video.melabs.com/getting_started/index.html

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  10. #10
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    cnc--
    Before you decide on PBP, I would suggest you also try the Proton compiler demo, and get a feel for which you prefer. The bottom line is that both are great compilers, and you won't go wrong with either. They are both based on the BS2 language, although Crownhill hasn't tried as hard to adhere to it as they've expanded Proton. I have purchased and used both compilers, and now almost exclusively use Proton. I would say that PBP is a tiny bit better for newbies, for two reasons. The parser is a little more forgiving with extra parentheses, and it's also able to parse out longer calculations. (Also, it's a little closer to BS2 compatibility--and a lot of newbies try to paste code.)

    I use Proton, however, because I prefer it. If you know and are comfortable with asm, then you may also. Proton allows you to use bytes, words (2 bytes) and dwords (4 bytes signed) and floats all in one file without selecting a separate compiler. It also has a few more commands, in addition to built in support for interrupts. And quite a few of the "undocumented" features of the compiler are available on the forum, allowing you to go wild. More importantly (for some projects), however, the code is always more compact with Proton, because it has an optimizer that takes a few additional passes, depending on your settings. Sure, PBP has a great user-base supplied interrupt routine, but the code is still always larger than with Proton, even with Proton's optimizer off. And the bigger the program (i.e. crossing page boundaries) the bigger the difference in code size.

    Oh, yeah... Proton also puts out a readable ASM file, rather than a file filled with macros. That's probably the main reason the optimizer is superior on Proton--because it has one, and PBP leaves all macro code as-is, with no optimization. But that's also why PBP compiles in less time, since it doesn't make optimizing passes.

    FWIW, Crownhill, the company who brought us Proton, also brought you this forum.
    http://www.protonbasic.co.uk/forum.php

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does Proton still do the dongle thing in order to run the software?
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Well I will keep proton in the back of my mind as i already ordered PBP.

    I do have a new question, Are you saying I won't be able to use bytes and words in the same program? Of course, I am used to only being able to work with bytes. Words are just a concept to me that require lots of xtra code.

  13. #13
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    With PBP you have
    BIT
    BYTE
    WORD
    LONG ( with the 18Fxxx chips)
    for variable sizes and they can all be used in the same program.

    You may find this interesting
    http://melabs.com/resources/articles/longs.pdf
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Thanks Dave, good read, now it makes more sense.

  15. #15
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Does Proton still do the dongle thing in order to run the software?
    Yes, Proton still has a dongle...
    But free upgrades.


    LONG ( with the 18Fxxx chips)
    LONGs (Dwords in Proton) are not available for 16F's or smaller chips. For a hobbyist, this is not an issue. On the other hand, if designing for a product where price is an issue, it can be a deal breaker.
    Last edited by tenaja; - 24th August 2010 at 14:45.

  16. #16
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tenaja View Post

    LONGs (Dwords in Proton) are not available for 16F's or smaller chips. For a hobbyist, this is not an issue. On the other hand, if designing for a product where price is an issue, it can be a deal breaker.
    Hi, Tenaja

    OR you didn'y use PBP for long time ...

    OR you should be Honest ...

    With Darrel last goodie, you can calculate with as many bits as you want ... and 32 bits calculations are easy to reach with pure PBP ...
    just making your calculations somewhat clever ...

    add to that floats are easy to use too ...

    OR ... you are on the wrong forum ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  17. #17
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Alain,
    I have both compilers, it's just that I primarily use Proton, as a personal preference. The information on both forums is helpful. Remember, at the very beginning, I said both are good products and you won't go wrong. BUT--that's ONLY because of contributors like DT. Without his contributions, I could not have made that statement. And that alone makes Proton a better compiler, because he may change jobs or focus some day, but both compilers will still remain. The fact is that Proton has a far better track record for actual improvements, while PBP has remained rather static. What, two new (significant) features added over the last five years? And one of those--Long's--was on Proton from the beginning!

    I don't get it why people take personal offense when someone says product "a" is better than product "b". It's a lot like the lame pc software reviews of the 90's where the magazines would let readers vote, and make their conclusion based on the vote. Have you EVER seen someone vote saying "I made the wrong choice"?

    Well, I did, and I'm man enough to admit it. That's why I have both. Do YOU have both? I once tried to give my PBP license away to a developer who's used Proton, and he wouldn't take it!

    Sure, you can use DT's plug-ins. But if you are shopping for a new package, why bother? You can have the features built-in, with instructions on how to use them in the manual with Proton. All in one compiler without changing settings or including a hack. And at a lower price. And tighter asm output.

    And, yes, Proton has its hacks available, too. But typically the popular hacks get implemented into new releases. Tim Box was the original developer of the Instant Interrupt concept for PBP. He also implemented it for Proton. So this is the perfect example, because now it's an integrated feature of Proton.


    CNC guy--don't take me wrong, you have a good compiler, with good support. But I own both, and think Proton is better.

  18. #18
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Alain, I didn't take you wrong, I read the first part saying they are both great products. I actually like hearing folks debate on the merits of products. As long as there is no stone throwing, and its all factual, it is just helpful in the end.

    For my purposes, I'm sure I will not use a long till a long time from now. Truth be told, programing 8085's with direct hex 20 some years ago, I have become used to working around most things over a byte. (ASM was like a high level language to me at the time) Now I'm sure that has everything to do with how I need to use uP's. Long variables to me mean big math or long delays, neither of which I have needed thus far. So the only thing I may be concerned about is code size (=speed), but I doubt that will be an issue. I have always just used 4Mhz in the past, now I'm gonna be running 32Mhz. So I will prolly wish it would slow down.

    Its been some 10 years I think since I messed with BS1, So I don't even remember how to start a program. But I will sort it out, or ask questions.

    I am hoping for a tutorial in the book or the help menu.

    My biggest goal is to have an easier time housekeeping 52 I/O lines. That is really what pushed me over the edge.

  19. #19
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Which chip are you planning to start with?

    What do you have for a programmer?
    Dave
    Always wear safety glasses while programming.

  20. #20
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Which chip are you planning to start with?

    What do you have for a programmer?
    First project for PBP will be 16F1946 interface card for parallel port to steppers, also handling limit switches, homing and such. Past projects were based around 16f676 or 16f818

    I am using ICD3 for my programmer/debugger.

    Don't get me wrong, I am NOT looking for folks to write my program. I have all the pins defined. I don't have the board drawn up yet, I like to see if my pin assignments need to change for some reason.

    Here is what I am looking for, in MPASM, I know I have to start with an include for the chip. then I always cblock ram, and .org the start of my program. from there its code away!

    So I asume there are some basic must haves that will appear in the start of any PBP program. I will look over all the examples to start figuring this out.

  21. #21
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rsocor01 View Post
    CNCGuy,

    Also, you can watch the next video to get you started. The video also has some nice tips and tricks. Ignore the LABX-1 Experimenter Board part if you are not planning on using it.

    http://video.melabs.com/getting_started/index.html

    Robert
    Somehow I missed this post, and its in my thread!

  22. #22
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    So I asume there are some basic must haves that will appear in the start of any PBP program. I will look over all the examples to start figuring this out.
    Hi CNC

    Find here a ( detailed ! ) Header for PBP program :
    Code:
    '*****************************************************************************
    '*****************************************************************************
    '
    'PIC 18F2520 @ 4Mhz + Horloge EXT 32 768 Hz sur TMR1 ( interruptions @ 1Hz )
    'Compte-Tours avec Capture sur TMR3 avec Horloge système / 8.
    '
    'Afficheur LCD 2*8 sur PORTD
    '
    ' 3745 Lignes assembleur
    '
    '*****************************************************************************
    '*****************************************************************************
    '
    'Defines
    '*****************************************************************************
    DEFINE OSC 4
    DEFINE BUTTON_PAUSE 250 
    DEFINE ADC_BITS 10
    'DEFINE LCD_COMMANDUS 2000
    'DEFINE LCD_DATAUS 50
     
    ' Define LCD connections
    DEFINE LCD_DREG PORTC    ' Set LCD Data port
    DEFINE LCD_DBIT 4        ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORTB   ' Set LCD Register Select port
    DEFINE LCD_RSBIT 5       ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTB    ' Set LCD Enable port
    DEFINE LCD_EBIT 6        ' Set LCD Enable bit
    DEFINE LCD_BITS 4        ' Set LCD bus size (4 or 8 bits)
    '
    '
    '*****************************************************************************
    ' Constantes
    '*****************************************************************************
    ExtOSC   con 32768  'Quartz Horloge "temps" en Hz
    Tension_  con 0   'Correspondance pour Canaux ADC
    TempA_  con 1
    TempH_  con 2
    Dureetonte con 1  ' de -1h à +59 mn ... ( 1/2 durée !!! )
    Kelvin  con 273
    '***************************  seuils Alarmes  ********************************
     
    AlmVolt  con 15 * 100 '>=  Tension trop élevée   1/100 V
    AlmRpm  con 3600   '>=  Régime trop élevé   T/Mn
    AlmAir  con 90  + 273 '>=  Temp Air Trop élevée  °K ^ 82
    AlmHuileL con 0   + 273 '<=  Temp Huile trop basse  °K
    AlmHuileH con 100 + 273 '>=  Temp Huile trop élevée  °K
    '**************  Periodicités d'Entretien ( ordre croissant ! )  *************
    Service1 con 10 ' Heures
    ServiceV con 20    
    Service2 con 25
    Service3 con 50
    Service4 con 100
    Service5 con 300
    VERSION  con 1   'N° de la révision
    DATA (0),0 (29) 'Raz des Mémoires si reprogrammation
    '*****************************************************************************
    ' 1er préchargement 85H30M43S le 03/02/2010
    '*****************************************************************************
    DATA @0, VERSION
    DATA @4, $1     ' Affichage maintenance ?
    DATA @6, $55     
    DATA @8, $0     ' 85 Heures
    DATA @10,$1E    ' 30 Minutes
    DATA @12,$2B    ' 43 Secondes
    DATA @14,$B8
    DATA @16,$0B    ' 3583 Tr/mn
    DATA @22,$3C    
    DATA @24,$0     ' 83°C Air
    DATA @26,$3C    
    DATA @28,$0     ' 89°C Huile
     
    '*****************************************************************************
    '*****************************************************************************
    'Config processeur
    '*****************************************************************************
    '
    @   __CONFIG    _CONFIG1H, _IESO_OFF_1H & _OSC_XT_1H & _FCMEN_OFF_1H
    @ __CONFIG _CONFIG2L, _BOREN_OFF_2L & _PWRT_ON_2L
    @   __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
    @   __CONFIG    _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTBE_3H
    @   __CONFIG    _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L & _XINST_OFF_4L
    @   __CONFIG    _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
    @   __CONFIG    _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    @   __CONFIG    _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
    @   __CONFIG    _CONFIG6H, _WRTB_OFF_6H & _WRTC_OFF_6H & _WRTD_OFF_6H 
    @   __CONFIG    _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
    @   __CONFIG    _CONFIG7H, _EBTRB_OFF_7H 
    '*****************************************************************************
    'Config Osc
    OSCCON  = %01100000
    '*****************************************************************************
    'Config TIMERs
    T0CON = %00000010 ' 16Bits 1/8 prescaler, Horloge Système, OFF
         ' Utilisé pour détection sous regime ou arret
     
    T1CON = %00000000 '1/1 prescaler, Quartz 32,768
    ' *** Géré par Elapsed Timer ***
    T3CON = %01110001 ' CCP SUR TMR3,1/8 prescaler,Horloge système,ON
         ' Mesure de la vitesse
    '*****************************************************************************
    'Config CCP1 arret CCP2
    CCP1CON = %00000101 ' Capture sur front montant 
    CCP2CON = %00000000 'inhibition module CCP2
    '*****************************************************************************
    'Inhibition SSP
    SSPCON1.5 = 0
    '*****************************************************************************
    'Inhibition Comparateurs
    CMCON = 7
    '*****************************************************************************
    'Inhibition Reference interne
    CVRCON = 0
    '*****************************************************************************
    'Config Interruptions
    INTCON  = %10000000
    INTCON2 = %11110000
    INTCON3 = %00000000
    PIE1    = %00000100
    PIE2    = %00000000
    IPR1    = %00000001
    IPR2 = %00000000
    RCON = %10000000
    '*****************************************************************************
    'Config ADC
    '*****************************************************************************
    ADCON0 = %11000000  ' 
    ADCON1 = %00011100   ' A0 > A2 Vref+ A3, Vref- = Vss 
    ADCON2 = %10100110  ' Right Just., 8Tad, clock /64
    '*****************************************************************************
    '*****************************************************************************
    'Config et Prepositionnement E/S
    '*****************************************************************************
    PORTA = %00110000
    PORTB  = %00010000
    PORTC = %00001000
     
    TRISA  = %00011111
    TRISB = %00000110
    TRISC = %00000111
     
    '
    '*****************************************************************************
    'Alias E/S
    '*****************************************************************************
    'MCLR/ sur Broche 1 par R/C/D
    Voltage  var PORTA.0  'TENSION Batterie / 4
    TempA  var PORTA.1  'LM335 Temp Air
    TempH  var PORTA.2  'LM335 Temp Huile
    Vref  var PORTA.3  'TL431 = 4.096v ...
    Raz   var PORTA.4  'JUMPER Raz/Programmation
    AlRef  var PORTA.5  'Alimentation référence TL431 + capteurs
    Buzzer  var PORTB.0 
    Contact  var PORTB.1  ' + 12 v sous clé ( / 4 = 2 - 4 v !!! )
    Selection  var PORTB.2  'Poussoir sélection Affichage
    Signal  var PORTB.3  'Sortie Survitesse
    AlLCD  var PORTB.4  'Alimentation LCD BS 250 !!! 0 = ON : 1 = OFF
    RS   var PORTB.5
    E   var PORTB.6
    Alm   var PORTB.7  'Sortie Alarme
    '   var PORTC.0  'Qz 32768
    '   var PORTC.1  '   "
    Speed  var PORTC.2  'Entrée compte-tours 1C/4T
    Alim  var PORTC.3  'Autoalimentation
    D4   var PORTC.4
    D5   var PORTC.5
    D6   var PORTC.6
    D7   var PORTC.7
     
    '*****************************************************************************
    'Types Variables
    '*****************************************************************************
    '
    Result  var WORD
    Volt  var WORD
    Tension  var WORD
    Tensionmoy var WORD
    Tair  var WORD
    TAMax  var WORD  ' Valeur Maxi Split
    TairMax  var WORD  ' Valeur Maxi mémorisée
    Thuile  var WORD
    THMax  var WORD  ' Valeur Maxi Split
    THuileMax var WORD  ' Valeur Maxi mémorisée
    Dummy  var WORD
    Capture  var WORD
    CaptureOld var WORD
    Vitesse  var WORD
    Vitessemoy var WORD
    VitesseMax var WORD  ' Valeur Maxi mémorisée
    VitMaxSpl var WORD  ' Valeur Maxi Split
    Periode  var WORD
    Periode2 var WORD
    MaxPeriode var WORD  ' Pour calcul DIV32 ...
    HoursT  var WORD  ' Memorisation Heures totales
    HoursG  var WORD
    Service  var WORD
     
    LSelect  var BYTE
    SecondsT var BYTE  ' Mémorisation Secondes Totales
    MinutesT var BYTE  ' Mémorisation Minutes Totales
    AddH  var BYTE  ' Retenue 60M ...
    AddM  var BYTE  ' Retenue 60s
    Delay  var BYTE
    I   var BYTE
    RazT  var BIT
    Buzz  var BIT
    Reveil  var BIT
    Flagged  var BIT
    Display  var BIT
     
    INTCON.7  = 0    'Désactivation interruptions
    Alim    = 1    'Autoalimentation
    AlLCD   = 0    'Mise sous tension LCD
    Alref   = 1    'Mise sous tension référence
    PAUSE  500
    LCDOUT $FE,1                  ' Initialize LCD
    CLEAR
    Periode2 = 3000
    dummy = 2500*Periode2   'Juste Pour éviter de ralentir l'interruption ...
    MaxPeriode = DIV32 AlmRpm
     
    '*****************************************************************************
    'Includes
    '*****************************************************************************
    INCLUDE "DT_INTS-18.bas"
    INCLUDE "ReEnterPBP-18.bas"
    INCLUDE "Elapsed_INT-18_ExtOsc.bas"  ; Elapsed Timer Routines
    ASM
    INT_LIST_H  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler    TMR1_INT,  _ClockCount,   PBP,  yes
         INT_Handler    CCP1_INT,  _Period,       PBP,  yes
     
        endm
        INT_CREATE_H            ; Creates the interrupt processor
    ENDASM
    ...
     
    Main: ' " active " code now
    as you see ... it's not too far from assembler but banks selecting ( if any ...) and other " details " ( memory maps, "multibyte" variables types ...) are held by PBP ...

    note this one is rather long due to the use of all pins and most of the peripherals ... ( just serial link missing ! )

    Alain
    Last edited by Acetronics2; - 25th August 2010 at 13:15.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  23. #23
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Thank You and sorry

    the sorry is cuz I noticed I have some folks names mixed up.

    The thank you is for that wonderful example of a header. Also its great to know PBP tends to the banks and such. So basically we get to code as though there are no banks. that takes loads of housekeeping out of the equation.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  24. #24
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    So basically we get to code as though there are no banks. that takes loads of housekeeping out of the equation.
    Exactly ... you got it !!! no " Banksel " or " Pagesel " to use. Compiler just will warn you if you cross pages ... just warns if some assembler lines are in the vicinity !

    and PBP Basic language is based on already written Macros ... so, you just have to " call " them one after the other.

    no housekeeping for page crossing nor I/O changing if the command implies it, ( One wire commands i.e - the macro drive them as required by itself - ) ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  25. #25
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Thank you everyone, I received my software today and will start to play with it soon. As I come upon questions, I will post with new threads assuming the answer is not already here.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  26. #26
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default welcome

    Bert, good choice

    There are some really helpful people here, often prepared to answer basic as well as complex questions, and if they have been asked before and buried in the archives will often point you in the right direction.

  27. #27
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default One last question for this thread

    For some reason or another, I was under the impression PBP would run fine under win7 64. But I get access violations and or there is a problem. Anyone have any ideas? Seems like the demo ran fine.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  28. #28
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I have no problems with win 7 64bit.
    Did you let everything instal to the default locations?
    Can you give the exact errors?
    Dave
    Always wear safety glasses while programming.

  29. #29
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    first answer, yes all installed to defaults.
    Also before I installed, I ran uninstall for the demo. I suppose it took it all out?

    screenshot showing error:
    Name:  error message1.png
Views: 584
Size:  25.4 KB
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  30. #30
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'm running on W7-64 and it works but initially I had trouble as well. Though I don't recognise the error you've got.

    When using 64bit versions you must use MPASM as the assembler, in MCSP select View->Compile and program options, select the Assembler tab and tick the box for MPASM (if you haven't already), then make sure it points to the correct location.

    Second, (this may not apply depending on the version of MCSP that you've got) I had problems updating my MCSP online. Turned out I had to run MCSP in XP compatibility mode while running the update and then switching it back to normal mode. (I'm now on 3.0.0.5 with PBP 2.60).

    Also, try running MCSP with administrator rights.

    I hope you'll get it going!
    /Henrik.

  31. #31
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    When using 64bit versions you must use MPASM as the assembler,
    Hmmm, is there any workaround for that ? I don't know why, but somehow some of my PIC16F projects don't work properly if I use MPASM as the assembler.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  32. #32
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rsocor01 View Post
    Hmmm, is there any workaround for that ? I don't know why, but somehow some of my PIC16F projects don't work properly if I use MPASM as the assembler.
    That is odd. A chip from Microchip not working with their own assembler?
    Dave
    Always wear safety glasses while programming.

  33. #33
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'm not aware of any workaround. The reason for it not working is (I think) that it (PM) is a 16bit application and that the 64bit versions of Windows doesn't support 16bit applications any longer. There's a note about it on Melabs site.

    I've compiled and assembled code for anything from 12F to 18F with PBP2.60 and MPASM on Win7 64 bit. I'm sure someone around here will figure out the problem if you provide some details.

  34. #34
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Sucess!!

    Ran as administrator, and all seems to be good now. Thanks for the tips!!

    Of course that raises all different questions about winblows and who really owns my computer.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  35. #35
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    Of course that raises all different questions about winblows and who really owns my computer.
    Hi, Bert

    Do not waste your precious time with such little details ... works fine, now.

    BTW: I still use one computer with XP SP3 ( Pentium 3 @ 1.2Ghz ) and another with 98SE ... never had problems with my old softs.

    just Cypress IDE a bit slow ... just a little bit ...

    You understand why I do not want to hear about " younger " versions of Windows ???

    Alain

    PS: I built ( say assemble ... ) my computer myself ... but do not want to know what's inside !!!
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  36. #36
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Bert

    BTW: I still use one computer with XP SP3 ( Pentium 3 @ 1.2Ghz ) and another with 98SE ... never had problems with my old softs.

    You understand why I do not want to hear about " younger " versions of Windows ???

    Alain

    Of all the windoze revs, I like Xp best myself. I have full size machining centers running on DOS. Now thats as good as it ever got IMHO from microsoft. I did figure out if I run win7-32, I can still run ACAD 2000, but I will buy a machine if it comes with XP still just to have it. its cheaper than ACAD upgrade!

    I have "built" a few, but for my use, it never pays. super market boxes are just cheaper in the long run for me.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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