Menu

98,02 RC5 feedback

2018-05-04
2018-05-11
<< < 1 2 3 > >> (Page 2 of 3)
  • stan cartwright

    stan cartwright - 2018-05-07

    doh me. There's nano/mini328@57600 further down the list. I need stronger glasses.

     
  • Moto Geek

    Moto Geek - 2018-05-08

    As the great Homer Simpson says.... DOH!

    I have what I hope is a noob type question, but where can I find out, without bothering too many members, what the syntax is, and means, that is used for the configurations? ie, -c Arduino -b 115200 -P %port% -p AT%chipmodel% -U flash:w:"%filename%":i

    What does the -P or -p or AT% or -b, etc... mean. I have seen this in the batch files, but my only chore was to add or delete "rems" to make things work. But I never really knew what all that meant or did. I am willing to read and learn like a bandit, if one can just stear me in the right direction... I really want to understand this info as it will help me show others as well as make me happy that I learned something. Thanks for any and all help as usual!!!!

     
    • Hugh Considine

      Hugh Considine - 2018-05-08

      These depend on what the programming tool wants to see.

      Anything between the % signs is dealt with by the compiler. %chipmodel% is replaced with the name of the current chip from the #chip line, %filename% is replaced by the hex file name that needs to be programmed into the chip, and %port% is replaced by whatever the port setting is in the GUI.

      Compiling a program called C:\Temp\test.gcb for an Uno (mega328p) on COM21 would result in these arguments:

      -c Arduino -b 115200 -P COM21 -p ATmega328p -U flash:w:"C:\Temp\test.hex":i
      

      These arguments would then be passed to the avrdude.exe, which is responsible for putting the hex file into the microcontroller. A full list of the arguments it accepts is at https://www.nongnu.org/avrdude/user-manual/avrdude_4.html#Option-Descriptions - but in short, -c is the programmer type, -b is the baud rate, -p is the chip, and -U is the operation to perform.

      Don't worry too much about the specific parameters in this particular example, for AVRDUDE we need one setup, for the PICkit 2 we need a completely different setup. If you're using a programmer that we've already defined then you shouldn't need to edit anything in here, but if you're adding a new programmer you'd need to spend some time reading the manual for that and working out what command it needs.

       
  • stan cartwright

    stan cartwright - 2018-05-08

    MotoGeek-So, it's only you and me that didn't know what the script meant.
    Lots of options for directories,etc. Strange considering the programmer software-pk2,3,etc is installed in the gcb@syn dir by gcb.
    When I started using gcb 18 months ago, it was on a uno and I hadn't figured the rem-unrem script in ide tools/programmer preferences, so I used Xloader to flash hex files. I never used the arduino ide so stk500 meant nothing either.
    When I first erased a picaxe chip and flashed a gcb hex file, I downloaded pickit2 software and used that.
    Seems daft now but it took me a while to realise it was all built into the gcb ide. Doh indeed!

     
  • Moto Geek

    Moto Geek - 2018-05-08

    Thanks Hugh for that info. It seems to me that this type of command line was also used when I tried the Northern Software programmer (which worked very well BTW). Makes a bit more sense and I just like to know whats going on behind the curtain, As you said, I won't worry too much about that at this point as you guys pretty much handled all that for us. Big thanks!

    @Stan, it seems like you've come a long way in 18 months. I have still yet to use any avrs with GCB as so far all my projects have worked well using the PICs. Thats just the way I started when I came across GCB. No real reason behind it. GCB has come a long way also and I am very happy about how well it is supported and that it keeps getting better and better. Anobiums youtube videos have really helped me get started. Nothing sucks more than jumping on a platform and then it suddenly dies and is no longer supported. This has happened to me before.

     
  • stan cartwright

    stan cartwright - 2018-05-08

    My EPE programmer software ran on win 95, problems with win xp. nuff said.
    I joined this forum nov 2016 and the picaxe forum sept 2016 so bought into picaxe but only used it for 3 months. Their definition of a basic compiler uses poetic licence.
    A gcb robot won't run any better than a picaxe robot. Ultra sonic sensors still take the same time but a glcd is a different matter. Try a simple scope in picaxe.
    So assuming you can program in basic which is easiest to use from scratch?
    Picaxe use either their rs232 or usb cable. Gcb, well many options.
    Arduino is standard usb cable so for me that was easiest gcb option.. it was simple but as I said I used xloader.
    Other gcb users have used picaxe so their views on gcb ease of use.
    The route to programmers takes a while and a lot is repeated tool bar icons which have short cut keys to.

     
  • stan cartwright

    stan cartwright - 2018-05-08

    When I try the demos I flash them without saving with different name in a different folder so the demos fill up with other files.
    Worse still I open a demo and modify it then assemble or flash and I've messed up the demo.
    Is there an option to rename as file(1) if the file has changed since opening when it auto saves when assembling or flashing?

     

    Last edit: stan cartwright 2018-05-08
    • Anobium

      Anobium - 2018-05-08

      I normally do a 'save as'. Seems to work for me.

       
      • Chris Roper

        Chris Roper - 2018-05-08

        Save as works, but it may be a good idea to force it by write protecting the Demo Files in the install.

         
  • Moto Geek

    Moto Geek - 2018-05-08

    I have experienced messing up the demos folder also in the past, so now a simple "save as" to MY project folder is the first thing I do right after opening a demo. Just good practice I guess...

     
    • Anobium

      Anobium - 2018-05-08

      My Golden Rules:

      Never, never, never, never, never, never, never change the files under GCB@SYN. If I do... I copy else where.

      Always be prepared to delete GCB@SYN without a heartbeat. Means do not save anything into GCB@SYN

      As I have every version of GCB since 2007! And, a lot of versions- Never, never, never, never, never, never, never change the files under GCB@SYN to mess up a specific version.

      Use SVN. Use GitHub. Oh and backup every Sunday at 1900 whilst at Church.

      And, when something does not work - as Arthur Dent would say 'Don't panic... delete it'. Arthur Dent never really said 'delete it' but if he was with us.. he would.

      :-)

       
  • Chris Roper

    Chris Roper - 2018-05-08

    In explorer navigate to the folder:
    C:\GCB@Syn\GreatCowBasic

    Right Click on Demos and select Properties.
    Click on Read-Only until it has a Tick in the box.
    Click OK then Click OK again when it prompts to apply to subfolders.

    Now if you edit and try to compile a demo you will get a dialog box like this to remind you:

    No more corrupt or messy Demos Folders.

    Cheers
    Chris

    P.S. Forget 1900 on Sundays, I pray every time I hit the HEX/Flash Button :>)

     
    • Anobium

      Anobium - 2018-05-08

      Very, very funny!

       
  • stan cartwright

    stan cartwright - 2018-05-08

    Good advice Chris.

     
  • stan cartwright

    stan cartwright - 2018-05-08

    Rant on. I just connected a ili9341 spi glcd to a 16f18855 expess board and I can't find the answer posted- how to set up the pins to do stuff so try again with RC5 to test.
    I wrote some code and ran pps tool but peripheral input is meaningless to me and microchip don't make it easier.
    With the emphasis on the pps tool and the newer pics that need pins programmed but are now supported, I think it odd there's no help (that I can find) to use them with gcb terminology.
    Defining the pins in the code with peripheral input/output and gcb is not obvious.
    If I'd used a uno it would be working.
    Is anyone else to proud to say it's difficult or am I dim?

    #chip 16f18855,32
    #option Explicit
    #define GLCD_TYPE GLCD_TYPE_ILI9341
    
    #define GLCD_DC portc.1
    #define GLCD_CS   portb.2
    ;#define GLCD_RESET   portd.4 ; Reset line Tie high..not needed
    #define GLCD_DO   portb.5 ; Data out | MOSI SDI
    #define GLCD_SCK   portb.3 ; Clock Line SCK
    #define ILI9341_HardwareSPI    ' remove/comment out if you want to use software SPI.
    #define GLCD_EXTENDEDFONTSET1
    GLCDfntDefaultsize = 1
    GLCDRotate (landscape)
    GLCDCLS ILI9341_BLUE
    
    GLCDPrint (0,0,"hello",ILI9341_WHITE)
    
    do
    loop
    
     
  • stan cartwright

    stan cartwright - 2018-05-08

    re above. Is there a translation ... like uart tx is?? rx is ?? clock/sck is ?? mosi is?? miso is?? cs is?? sdl is ?? sda is ??
    Anobium recommended xpress board for newbies. ok, it's usb plug and play like an arduino but there the similarity ends. It's google/learning/devices time again.
    As Motogeek can get on without arduino..I can get on without complicated pics. The 18f25k22 I use is simple to program and good spec.
    If it's this difficult with the pps tool..what would it be like without it?
    I have googled microchip pps info but I'm no wiser so don't say I didn't try.

     
  • stan cartwright

    stan cartwright - 2018-05-09

    I searched the forum and found this code which I think sets up the marked sockets to be as marked ie mosi,sck,rst, etc. but still no idea what corresponds to pps tool. Just searched microchip 16f18855 spi and just c mplabx.

    ' MPLab Xpress 16F18855 Evaluation Board
    '
      #Chip 16F18855,32
    
    ' MikroBUS Peripheral Allocation
    
        'Generated by PIC PPS Tool for Great Cow Basic
        'PPS Tool version: 0.0.5.11
        'PinManager data: v1.55
        '
        #startup InitPPS, 85
    
        Sub InitPPS
    
                'Module: EUSART
                RC5PPS      = 0x0010    'TX   > RC5
                TXPPS       = 0x0015    'RC5  > TX (bi-directional)
                RXPPS       = 0x0016    'RC6  > RX
                'Module: MSSP1
                RC3PPS      = 0x0015    'SDA1 > RC3
                SSP1DATPPS  = 0x0013    'RC3  > SDA1 (bi-directional)
                RC4PPS      = 0x0014    'SCL1 > RC4
                SSP1CLKPPS  = 0x0014    'RC4  > SCL1 (bi-directional)
                'Module: MSSP2
                RB3PPS      = 0x0016    'SCK2 > RB3
                SSP2CLKPPS  = 0x000B    'RB3  > SCK2 (bi-directional)
                SSP2DATPPS  = 0x000C    'RB4  > SDI2
                RB5PPS      = 0x0017    'SDO2 > RB5
    
        End Sub
    
    ' MikroBUS Port Pin Definitions
    
      #define MBUS_AN   PortB.0   ; Analogue
      #define MBus_RST  PortB.1   ; Reset
      #define MBus_CS   PortB.2   ; Chip Select (SPI CS)
      #define MBus_SCK  PortB.3   ; SCK2  (SPI Clock)
      #define MBus_MISO PortB.4   ; SD02  (SPI Data In)
      #define MBus_MOSI PortB.5   ; SDI2  (SPI Data Out)
      #define MBus_PWM  PortC.7   ; PWM
      #define MBus_INT  PortC.2   ; Interrupt
      #define MBus_Rx   PortC.6   ; EUSART Rx
      #define MBus_Tx   PortC.5   ; EUSART Tx
      #define MBus_SCK  PortC.4   ; SCL1  (I2C Clock)
      #define MBus_SDA  PortC.5   ; SDA1  (I2C Data)
    
    ' ____________________________________________________
    '
    Cheers
    Chris
    
    Last edit: Chris Roper 2017-11-29
    

    If I can't sort this program pins function on xpress board then that applies to all newer pics.

     
  • Chris Roper

    Chris Roper - 2018-05-09

    Test results:
    I have tested and can confirm that the following parts work with the PICKitPlusCMD programmer:

    Device  Family  pins
    12f1572 18  8
    12f1840 14  8
    12lf1840    14  8
    16f1619 18  20
    16f18313    18  8
    16f18326    18  14
    16f18346    18  20
    16f18426    21  20
    16f18446    21  20
    16f18855    21  28
    16f18857    21  28
    16f616  0   20
    16f690  0   20
    16f88   0   14
    16f886  0   28
    18f1320 3   14
    18f14k22    6   20
    18F2550 3   28
    18F25k50    6   28
    

    Cheers
    Chris

     
    • Anobium

      Anobium - 2018-05-09

      Thank you Chief Test Engineer.

      It is excellent news. We have all three tested idendently. Some old chi, some new chips, some 12f, some 16 and some 18f.

      A good result.

       
  • Chris Roper

    Chris Roper - 2018-05-09

    PPT:

    Suggestion:
    When an entry is double Clicked it should open in the editor

    Reasoning:
    This is the expected behaviour in windows as per the Windows Style Guide.

     
  • stan cartwright

    stan cartwright - 2018-05-10

    To finish this ili9341 test on a xpress board using RC5.
    I used portc.3,4,5,6 for the display and now works fine.
    I've learnt something about these pics pins now.

        #startup InitPPS, 85
        Sub InitPPS
                'Module: MSSP1
                RC6PPS = 0x0014    'SCK1 > RC6
                SSP1CLKPPS = 0x0016    'RC6 > SCK1 (bi-directional)
                RC5PPS = 0x0015    'SDO1 > RC5
        End Sub
    

    I tried the ili9341 simple demonstration but needs modifying.
    Error: Program is too large, cannot fit all subroutines into available program memory
    I put the subs inline but still mem size prob.
    Error: First page of program memory is full, please reduce size of Main and Interrupt routines

     
  • Anobium

    Anobium - 2018-05-10

    Yes, you may to create smaller methods (sub or function) to fit the methods into the 16f memory pages. This is a memory constraint of the 16f. See thread https://sourceforge.net/p/gcbasic/discussion/579126/thread/a4d2eda2/

    We have improved the messaging with respect this in the next formal release of the compiler. So, in the formal release of v0.98.02 you will be informed of the method that as exceeded the page size.

    So, meanwhile.... cut the method into two methods.

     
  • stan cartwright

    stan cartwright - 2018-05-10

    don't understand cut the method into two methods. There are no subs now.
    What new supported pics series number don't have this page issue?

     
    • Anobium

      Anobium - 2018-05-10

      18f range.

      If there are no subs, then the main program is too big. Create subs of the main program.

       
  • stan cartwright

    stan cartwright - 2018-05-10

    It had subs and I thought -- Error: Program is too large, cannot fit all subroutines into available program memory -- meant remove subs.

     
<< < 1 2 3 > >> (Page 2 of 3)

Log in to post a comment.