Back to the beginning


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 49
  1. #1

    Default Back to the beginning

    How on earth do I get PBP3 to talk to my EasyPIC v7 ?

    EasyPIC v7 USB device drivers are loaded and running. Windows 7 (64Bit) can see the board.

    PBP3 is running but when I try to unite the two I get nothing.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi Andy,
    I have tried to explain this to you in one of the other threads but I guess (yet) a new thread is better than continuing in one of the others. Anyway....

    You need to understand that PBP is a compiler, it compiles programs - that's it. It does not talk to ANY hardware what so ever.

    You use PBP to compile programs, the compiler than automatically launches the assembler (that's why you need MBLAB installed) and the outcome of the assembly process is a .hex file which is to be programmed into the PIC chip (can be one on the EasyPIC 7 or elsewhere, PBP does NOT know or care).

    If you want to program the PIC chip onboard the EasyPIC7 you need to use the programmer application supplied with the board (mikroProgSuite).

    For future reference, are you using PBP3 as a tool inside MPLAB or are you using the MicroCodeStudio IDE or are you using anything else?

    Finally, I'm sure you realise that PBP3 is a product from MicroEngineeringLabs while the EasyPIC 7 is a product from one of their competitors (MikroElectronica).

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    This is the problem. PBP3 just does not connect to IDE ???

    PBP3 outputs .pbp files. How the **** do you then import them into IDE.

    You state that PBP launches IDE - HOW ??

    I've tried asking melabs, but they are about as helpful as a chocolate fireguard to us newbies.

    I appreciate that these are simple questions to seasoned PIC programmers but us newbies need somewhere to start.

    I don't mean to be a pain but it's often difficult to ask the right question in the right topic.

    Does anyone know of a good tutorial just to exercise how the bits are supposed to work together.

    Once I can get a simple program into a PIC I can then progress.

    Most tutorials stop short. Yes they show you the basic programming, and then they jump to IDE. Can someone come up with a single tutorial that lights an LED ?

    I'm perfectly capable of writing PIC basic but I just cannot understand the process of getting it into the PIC.
    Last edited by AndyFreestone; - 4th April 2013 at 16:05.

  4. #4
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by AndyFreestone View Post
    ...I'm perfectly capable of writing PIC basic but I just cannot understand the process of getting it into the PIC.
    As Henrik explained (several times actually):

    You need to understand that PBP is a compiler, it compiles programs - that's it. It does not talk to ANY hardware what so ever.

    You use PBP to compile programs, the compiler than automatically launches the assembler (that's why you need MBLAB installed) and the outcome of the assembly process is a .hex file which is to be programmed into the PIC chip (can be one on the EasyPIC 7 or elsewhere, PBP does NOT know or care).

    If you want to program the PIC chip onboard the EasyPIC7 you need to use the programmer application supplied with the board (mikroProgSuite).
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi Andy,
    This is the problem. PBP3 just does not connect to IDE ???
    IDE stands for Integrated Development Environment. It's piece of software on the PC, basically a fancy text editor with some extra functions. MBLAB is an IDE and MicroCodeStudio is an IDE.
    The most common one for use with PBP is called MicroCodeStudio.

    PBP3 outputs .pbp files. How the **** do you then import them into IDE.
    No. If you're using MicroCodeStudio it saves your source files as .pbp files but these are just plain text file. Before you can get them into the PIC you need to compile it/them. This is where PBP3 comes in.

    Question: Are you, or are you not using MicroCodeStudio as the software in which you write your PBP programs? If not, what are you using?
    Before we've got that squared away it's hard to give proper advice because you can very well write your program in notepad and compile them from the command line.

    You state that PBP launches IDE - HOW ??
    I did NOT state the PBP launces IDE. I said that PBP launches the assembler automatically (as long as it's installed properly).
    PBP3 can be launched FROM the IDE but not the other way around, but again, before we know what IDE you're using it's hard to help.

    At the top of the window of the program you're using to enter your program, what does it say there?

    /Henrik.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    HOW.

    I am using MicroCodeSudio. It does not automatically launch IDE.

    All I get is .pbp files as previously explained.

    The the top of the window it says MicroCodeStudio - PICBASIC PRO

    I can press the compile button but where does the .hex file go.
    Last edited by AndyFreestone; - 4th April 2013 at 16:49.

  7. #7
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by AndyFreestone View Post
    Yet another hapless response - HOW.

    I am using MicroCodeSudio. It does not automatically launch IDE.
    All yours, Henrik. Have fun!!!
    Why pay for overpriced toys when you can have
    professional grade tools for FREE!!!

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    I am using MicroCodeSudio. It does not automatically launch IDE.
    Finally, we're getting somewhere..... First of all MicroCodeStudio IS the IDE.

    Select View->Compile and program options and make sure the correct path where PBP3 is installed is specified there. If not, click Find Automatically and let it search for it.

    Then Click the Compile in the toolbar. (The IDE (MicroCodeStudio) will now launch the compiler (PBP3) which will compile the program and the launch the assembler which will assemble the compiled program into a .hex file. That file will be in the same folder as you saved your source file/program. It's that .hex file you should program into the PIC.

    If you don't see the compile button click View->Toolbars and check and make sure that Compile and Program is enabled, the button should now appear.

    /Henrik.

    EDIT: I guess you've seen the install video that's on the MELABS site? If not, here it is.

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Tell microcode studio where pbp compiler and mpasm resides.

    Type in your program, then click compile, then start whatever programming software came with your development board.

    That software will use the hex file from compile to program your pic.

    Robert

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    OK - sorry to sound rude but it's just so frustrating when there isn't a simple tutorial to follow.

    I've managed to get mikroProg suite for PIC to load .hex files onto the EasyPic v7 so I'm halfway there.

    I simply cannot get PBP3 to generate .hex files, all it generates are .pbp files ?

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi,
    I understand it's frustrating but you're not helping us help you either. It'll be much easier to help you if describe in more details what you're doing so we can spot any possible mistakes that you may be doing. Simply saying that it doesn't work is the worst problem description ever - which I'm sure you, as an engineer, can appreciate. We've tried to explain the process in quite some detail here but apparently we've either haven't been clear enough or you're not following the instructions properly or there's something wrong preventing it from working.

    * Did you watch the video I linked to?
    * What does it say when click View->Compile and program options, does it point to the folder where you indeed have PBP3 installed?
    * What happens when click the Compile button in MicroCodeStudio? Any error messages? If so, what does it say?

    /Henrik.

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Finally I'm getting somewhere.

    My apologies but I eventually found the .hex files that PBP3 has been generating.

    I'm starting with the real basics - trying to turn on an LED.

    I can't get any of the demo projects to work at all !! I did read and save the hex from the demo board and can reload that successfully.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    And where did you find it?
    Again, saying that it doesn't work doesn't allow us to help you. Can you compile them? Did you select the correct target device and which one is that?

    I'm perfectly capable of writing PIC basic but I just cannot understand the process of getting it into the PIC.
    There are a lot of jumpers/switches on the EasyPIC7 board that needs setting correct for whatever to work.
    A simple blink-a-led is by far the best method to verify that the PIC is actually running. If you feel, despite the above, that there MIGHT be something wrong with your code then post it - all of it.

  14. #14


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    I've just been playing with the examples that came with the demo version of MikroBasic Pro. I've had to play with the jumpers to get some of them to work too.

    I'll have another try with PBP3 Pro as I do find the PBP basic far more intuitive.

    PBP3 doesn't appear to need the CONFIG data that I am expecting ??

    Is that generated automatically ??

    The PIC on the board is an 18F452 - probably far more complex than I need, but hey, I've got a boxfull of them.

    The ICD is set for the correct processor, the correct clock speed (4MHz) and the rest are at defaults.

    All I'm attempting at this early stage is to set trisc to 00000000 and then set one pin high to illuminate an LED - hardly rocket science.
    Last edited by AndyFreestone; - 5th April 2013 at 13:07.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi,
    PBP has default set of CONFIG settings for each individual device which it uses if you don't "override" via the #CONFIG/#ENDCONFIG directives (see the manual for details). To find out what default CONFIGs PBP is using for the particular device go to your PBP3 installation folder, open the DEVICE_REFERENCE folder and open the .info file for your particular device - everything is described there (they are plain text files).

    When compiling make sure you use the Compile button (or F9), don't use the ICD Compile.

    /Henrik.

  16. #16


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Just to try something, I was playing with a working example.

    By changing the values written to Port B I would have expected the LED pattern to change. It didn't is stayed exactly the same.

    Even when I removed all the calls to write to all the ports they kept on flashing as per the original program.

    Do I have to delete the old .hex file and then recompile? I would have expected a recompile to overwrite a previous version ?

  17. #17
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    You really should bring this up on a forum that supports your programmer.

  18. #18
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi, Andy

    playing it simple ...

    I 'm working for years with an Easypic 5 ... Ok ???


    1) you need to have the " Mikroprog suite for pic " and its drivers ( on your EasyPic CD or Here http://www.mikroe.com/easypic/programming/ ) installed.

    2) connect your Easypic with the USB cable to your computer. power ON

    3) open the mikroprog suite and @ first choose processor family and processor reference
    Then hit : File/Load Hex in the upper left menu ... and browse for the PbP Hex generated file you want to program.

    it's Here for me : C:\Documents and Settings\Alain\MCS_Prog ... Yes, Alain is my name !

    4) Hit the " code" Button to show your Hex in the appearing window ...

    5) Hit the " WRITE" button just under the processor reference ...

    it runs ...

    Alain

    Edit ...

    AND ...YES ... Easypic can be directly driven from MCS ...
    just browse this forum to find the " How to " ...
    Last edited by Acetronics2; - 6th April 2013 at 15:51.
    ************************************************** ***********************
    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Andy,
    Are you sure that you're actually ARE reprogramming the chip? It doesn't sound like you are to me.
    Of course you MUST recompile the program and of course you MUST reprogram the chip - how else would it work? When you recompile the .hex file on disc will be replaces with the newly compiled (no need to delete it) but the one in the chip will of course only be replaced when you reprogram the chip. The above is how PBP and MicroCodeStudio does it. If you're actually working with the MikroE examples and their compiler then I don't know and you'll be better off asking the question on the MikroE forum.

    Normally the programmer automatically erases the chip before programming but I'm sure there are settings for that in the programmer software.
    If you load a .hex file into your programmer software you can use the VERIFY function in the software to compare that .hex file to the one currently in the chip. If they are not the same then you haven't reprogrammed the chip properly.

    Robert,
    Come on, give the guy a break will you, he's new at this and apparently struggling quite a bit (more than anyone in a long time for some reason).

    /Henrik.

  20. #20


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Too right I'm struggling.

    The board is going through the motions of erasing and rewriting to the PIC.

    Could someone send me a .pbp or plain text basic listing for say the 12F509 in PBP3 just to see where I am going wrong.

    the manual just doesn't seem to have any tutorials and the example programs just don't work.

    All I want to do is to set TRISA to 000000 and then to POKE and output to it to see an LED illuminate. Everything that I have tried so far has come up with a syntax error - including the examples that come with the program.

    The manuals seem to be written by experts for experts. I'm an old man trying to learn new tricks.

  21. #21


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    This is an example that just does not work - OK laugh but once I get through the basics I'll be playing all night.

    ' Name : BLINKXU.pbp
    ' Compiler : PICBASIC PRO Compiler 2.6
    ' Assembler : MPASM
    ' Target PIC : PIC18F4550 or similar type
    ' Hardware : LAB-XUSB Experimenter Board
    ' Oscillator : 20MHz external
    ' Keywords : FOR NEXT
    ' Description : PICBASIC PRO program to blink an LED connected
    ' to PORTD.0 about once a second.
    '

    ' Define LOADER_USED to allow use of the boot loader.
    ' This will not affect normal program operation.


    ' RESET_ORG can be set to move the BASIC program out of the way
    ' of any boot loader running from location 0, such as the
    ' Microchip USB boot loader
    'Define RESET_ORG 800h

    #config
    _config _mclre_on & _CP_OFF & _WDT_OFF
    #endconfig


    mainloop:
    high porta.1 ' Turn on LED connected to PORTD.0 <----- SYNTAX ERROR
    Pause 500 ' Delay for .5 seconds
    Low porta.0 ' Turn off LED connected to PORTD.0
    Pause 500 ' Delay for .5 seconds
    Goto mainloop ' Go back to loop and blink LED forever

    End


    Although the comments box states that it is for a PIC18F452 the selection box on the compiler is set to 12F509.

    Even if the poor 12F509 does not have enough memory for the task in hand I shouldn't get syntax errors ?
    Last edited by AndyFreestone; - 6th April 2013 at 16:16.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Addendum due to the Timeout for editing...

    Programmer file : Microprog suite for Pic.exe

    Location : " C:\program Files\Mikroelektronika\Microprog suite for Pic

    Parameter line : -pPIC$target-device$ -f$hex-filename$ -e -w

    " tested and verified " ... no need to enter family and device ref then ...
    ************************************************** ***********************
    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
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by AndyFreestone View Post
    This is an example that just does not work - OK laugh but once I get through the basics I'll be playing all night.

    .
    .
    .

    #config
    _config _mclre_on & _CP_OFF & _WDT_OFF #endconfig


    mainloop:
    high porta.1 ' Turn on LED connected to PORTD.0 <----- SYNTAX ERROR
    Pause 500 ' Delay for .5 seconds
    Low porta.0 ' Turn off LED connected to PORTD.0
    Pause 500 ' Delay for .5 seconds
    Goto mainloop ' Go back to loop and blink LED forever

    End


    Although the comments box states that it is for a PIC18F452 the selection box on the compiler is set to 12F509.

    Even if the poor 12F509 does not have enough memory for the task in hand I shouldn't get syntax errors ?

    Doesn't compile due to your wrong CONFIG ...

    so; moreover, it can't be programmed into the chip ...

    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 " !!!
    *****************************************

  24. #24


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Addendum due to the Timeout for editing...

    Programmer file : Microprog suite for Pic.exe

    Location : " C:\program Files\Mikroelektronika\Microprog suite for Pic

    Parameter line : -pPIC$target-device$ -f$hex-filename$ -e -w

    " tested and verified " ... no need to enter family and device ref then ...


    Sorry but that might as well be in Japanese to me.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi,
    The PIC12F509 doesn't have a PortA and therefor no TRISA or PortA registers, so you get an error when you try to access things which are not available.

    /Henrik.

  26. #26


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by Acetronics View Post
    Doesn't compile due to your wrong CONFIG ...

    so; moreover, it can't be programmed into the chip ...

    Alain
    OK - how should it read ?

    I'm trying a real basic 12F509 to start with but for convenience I also have 12F629, 16F684, 16F506, 16F722 and loads of 18F45K22's
    Last edited by AndyFreestone; - 6th April 2013 at 16:39.

  27. #27


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Thanks Henrik,

    How does PBP3 address the single port of the 12F509?

    Andy

    I, probably wrongly, assumed that it would use TRISA.

    I did try to edit the sample program for the 18F452 just to change the outputs but nothing changed. We'll leave that problem again until later.
    Last edited by AndyFreestone; - 6th April 2013 at 16:42.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    As it does with any other register - by the registers name, which on the 12F509 is either PortB or GPIO for the actual port and TRISB or TRISGPIO for the "direction".
    You know, assumption is the mother of all f**k-ups so never assume anything - a simple look at the datasheet for the device would have told you that there is no PortA.

    /Henrik.

  29. #29
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by AndyFreestone View Post
    ... I also have ... loads of 18F45K22's
    This is for PBP 2.60c, so only the syntax for CONFIG changes.

    Code:
    ' PicBasic Pro program to blink all the LEDs connected to PORTD
    
    '   PIC     18F44K22 int osc
    '   PBP     v2.60c      MCS+    v2.1.0.7        U2 programmer   v4.32
    '   MPASM   v5.49       MCS     v4.0.0.0
    
    ' Define LOADER_USED to allow use of the boot loader.
    ' This will not affect normal program operation.
    
    asm
     __CONFIG    _CONFIG1H, _FOSC_INTIO67_1H & _PLLCFG_ON_1H & _PRICLKEN_ON_1H & _FCMEN_ON_1H & _IESO_OFF_1H
     __CONFIG    _CONFIG2L, _PWRTEN_ON_2L & _BOREN_SBORDIS_2L & _BORV_285_2L
     __CONFIG    _CONFIG2H, _WDTEN_OFF_2H
     __CONFIG    _CONFIG3H, _CCP2MX_PORTC1_3H & _PBADEN_OFF_3H & _CCP3MX_PORTE0_3H & _HFOFST_OFF_3H & _T3CMX_PORTB5_3H & _P2BMX_PORTC0_3H & _MCLRE_EXTMCLR_3H
     __CONFIG    _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
    endasm
    
    OSCCON  = %01111100
    OSCCON2 = %10000100
    OSCTUNE = %11000000
    
    ANSELA = %00000000          ' Set port to digital
    ANSELB = %00000000
    ANSELC = %00000000
    ANSELD = %00000000
    ANSELE = %00000000
    
    ADCON0 = %00000000          ' Disable ADC
    
    TRISD = %00000000           ' Set PORTD to all output
    
    ' Define	LOADER_USED	1
    DEFINE OSC 64
    
    i       var     byte        ' Define loop variable
    
    LEDS    var     PORTD       ' Alias PORTD to LEDS
    
        LEDS = %00000001        ' First LED on
    
    mainloop:
        For i = 1 to 7          ' Go through For..Next loop 7 times
            Pause 1000          ' Delay for 1 seconds
            LEDS = LEDS << 1    ' Shift on LED one to left
        Next i
    
        For i = 1 to 7          ' Go through For..Next loop 7 times
            Pause 1000          ' Delay for 1 seconds
            LEDS = LEDS >> 1    ' Shift on LED one to right
        Next i
    
        Goto mainloop           ' Go back to loop and blink LED forever
    End
    Robert


    EDIT: It's for a 18F44K22, but it is the smaller brother of the 18F45K22; same pinouts. I'm looking at it working right now, so it's good to go.
    Last edited by Demon; - 6th April 2013 at 18:01.

  30. #30
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
    '*  Notice  : Copyright (c) 2013 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 06/04/2013                                        *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    ' Name : BLINKXU.pbp
    ' Compiler : PICBASIC PRO Compiler 3.0' Assembler : MPASM
    ' Target PIC : PIC12F509 or similar type
    ' Hardware : LAB-XUSB Experimenter Board
    ' Oscillator : 4MHz external
    ' Keywords : FOR NEXT
    ' Description : PICBASIC PRO program to blink an LED connected 
    ' to PORTD.0 about once a second.
    '
    
    ' Define LOADER_USED to allow use of the boot loader.
    ' This will not affect normal program operation.
    
    
    ' RESET_ORG can be set to move the BASIC program out of the way
    ' of any boot loader running from location 0, such as the
    ' Microchip USB boot loader
    'Define RESET_ORG 800h
    
    #config
        __config _MCLRE_ON & _CP_OFF & _WDT_OFF
    #endconfig
    
    
    mainloop:
    high GPIO.0 ' Turn on LED connected to PORTD.0
    Pause 500 ' Delay for .5 seconds
    Low GPIO.0 ' Turn off LED connected to PORTD.0
    Pause 500 ' Delay for .5 seconds
    Goto mainloop ' Go back to loop and blink LED forever
    
    End
    this one should show 83 Words ...

    just "cut and paste" it ...
    Last edited by Acetronics2; - 6th April 2013 at 17:01.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  31. #31
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by Demon
    ... You really should bring this up on a forum that supports your programmer.
    vs

    Quote Originally Posted by HenrikOlsson View Post
    ... If you're actually working with the MikroE examples and their compiler then I don't know and you'll be better off asking the question on the MikroE forum.
    ...
    Robert,
    Come on, give the guy a break will you, he's new at this and apparently struggling quite a bit (more than anyone in a long time for some reason).

    /Henrik.
    Didn't I say the same thing? lol

    All he needs is to get one example working right on whatever chip he decides to use. He's got at least 2 to work with now, so it's down to hardware connection/setup, or programmer software.

    Robert

  32. #32


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Quote Originally Posted by HenrikOlsson View Post
    As it does with any other register - by the registers name, which on the 12F509 is either PortB or GPIO for the actual port and TRISB or TRISGPIO for the "direction".
    You know, assumption is the mother of all f**k-ups so never assume anything - a simple look at the datasheet for the device would have told you that there is no PortA.

    /Henrik.
    Again way over my current knowledge. How do I address THE PORT in PBP3 ?

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Like I said, on the 12F509 THE PORT is named PortB or GPIO not PortA.
    Otherwise you had it right - HIGH PortB.0 or HIGH GPIO.0 instead of HIGH PortA.0

    EDIT: I'm sorry, make that GPIO.0 only, PortB was for the 12F605 only which share the same datasheet.
    Last edited by HenrikOlsson; - 6th April 2013 at 17:56.

  34. #34


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    OK I've now got a HEX file that has compiled correctly. PBP3 does not recognise the EasyPIC board and the other IDE programs are looking for PICs that are far more advanced than my poor peasant. How do I now get that HEX file into a poor mariner. I've also got 10F200's that I would like to play with.

  35. #35


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    MikroProg Suite for PIC came the closest. It could program the PIC 12F509 but came up with over 1000 errors with the compiled code.

    Maybe the PIC 12F509 just has so little memory that it can't cope with compiled code ??

    Gooligum comes up with some useful assembly code programs, how do I implement assembly code into PBP3 ?

    I'd rather just work the PBP3 basic - Believe it or not I am quite proficient in BASIC programming.
    Last edited by AndyFreestone; - 6th April 2013 at 18:25.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Geez, we've been thru this a couple of times already.....
    You open/load the .hex file into the programer software (mikroProgSuite). That software then connectes to the hardware device programmer which is on the EasyPIC7 board and you use it to "download" the .hex file into the PIC.
    I'm sure there's a manual or help file available for the that software if you need it.

    If you haven't had the 12F509 running on the EasyPIC7 board make sure to read the manual (for the board) on how to set the board up for that device.

    /Henrik.

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    PBP3 does not recognise the EasyPIC board
    Of course it does not, PBP is a compiler.
    PBP takes text written in BASIC syntax and turns that text into text written in ASM syntax. Then MPASM is used to make a HEX file from the ASM text. It is up to YOU to pick the programmer (device) to transfer the HEX file to the chip.

    http://www.picbasic.co.uk/forum/cont...tudio-PICKIT-2
    Dave
    Always wear safety glasses while programming.

  38. #38
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Hi, Dave

    Have a look to post #1 ... it's not a Pickit but an EasyPic board ...

    you still don't wear your programming glasses ??? .... ohhhhhhh ... what a bad guy !

    Regards
    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    Yes, I know the OP is not using a PicKit. I was hoping the OP might get a general understanding of how programming works by reading through Steve's tutorial. With any luck, once he understands how code is created and moved to a processor he will be able to figure out how to use the tools he has.

    But I am thinking of getting a pair of tri-focals... ;-)
    Last edited by mackrackit; - 7th April 2013 at 12:36.
    Dave
    Always wear safety glasses while programming.

  40. #40


    Did you find this post helpful? Yes | No

    Default Re: Back to the beginning

    The manual for the board is pretty basic. As far I can ascertain the board is correctly set.

Similar Threads

  1. Beginning USB How to/Whats needed to use it.
    By wdmagic in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th April 2013, 21:11
  2. Missing chars at beginning of LCD display
    By jimbostlawrence in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th November 2009, 00:13
  3. 12F629 beginning
    By Davidpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 1st October 2007, 22:37
  4. Program returns to beginning at interupt
    By BGreen in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th April 2005, 11:20

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