Menu

Tinybootloader Help

Help
Keith
2020-10-28
2021-09-24
<< < 1 2 (Page 2 of 2)
  • stan cartwright

    stan cartwright - 2021-09-16

    hi Keith. Good thoughts about lgt328. I like it as Anobwan sorted it for gcb. I sent him a board if I remember. Send him anything and if he thinks useful then will intergrade it into gcb..
    The reason I use mega and now lgt is that's it's easy using just usb, The usb can even power lots of devices.
    How would your lgt boards be programmed using gcb?
    I think gcb and lgt is not getting the attention it's worth.
    If you use a spi glcd with lgt then it's visually faster than mega328.
    It got better a-d. also.

     
  • William Roth

    William Roth - 2021-09-17

    Hi Keith,

    Nice Project

    If you knock off some boards for the 16F18346 then at some point you could also use one of the modern 18FQ series chips with the same 20 Pin footprint. Same goes for 16F18855 and a 28-Pin footprint,. These "Q" chips are feature rich, and can operate up to 64 MHz which should satisfy most speed junkies ( except possibly Stan)

    Example: 18F27Q43
    28-Pins
    64MHz
    125Kb Flash
    8Kb RAM
    1Kb EEPROM
    5 USARTS
    PPS, 2-HSPI, I2C, 8-bit DAC, 12-Bit ADC , etc,etc

    Cost? 30 cents more than a 16F18855

    All 18FQ series chips are PPS enabled as are all 18FK42 series chips which could also be a very good choice. (TinyBootloader+ can support all of these)

    What I am saying is don't rule out these new 18F Chips as you move forward. These would be great for large memory intensive application.

    William

     

    Last edit: William Roth 2021-09-17
  • Keith

    Keith - 2021-09-17

    I don't want to run before I can walk with these boards. So far I have finished the Artwork for the 16F18346 and the bigger 16F18855 but I want to finish the 16F1937 before I port the lot over to our little yellow men to produce the PCB's.

    The TinybootLoader firmware is where I'm becoming unstuck. I really want to breadboard and prove the devices and the circuit before I spend cash on the PCB's.
    I have exhausted my 16F18326 projects, but I need to beg, borrow, barter, nick, scank or steal the TinyBootLoader firmware for the Micorchip Nano boards.

    The PPS code to include in the GCB Projects may prove to be a problem too.

    I like the idea of using an 18F27Q43. Perhaps I'll take a look at it once I've finished the artwork for the 16F1937

     
  • Keith

    Keith - 2021-09-18

    i need to retract that statement above about the PPS code being a problem. i completely forgot about the PPS Tool and more so how to use it.

    i'm not to keen on this age business...

     
  • Keith

    Keith - 2021-09-18

    @William. As recommended I have order a couple of 18F27Q43 devices. Hells Bells they are like Hen's Teeth. Found some On Mouser in the US, I have dealt with them quite a lot and the beauty of it is they have a UK Office so I don't get clattered with import duty and additional taxes.
    I have ordered an SPDIP version too so I can breadboard it and test it out before committing time with the PCB artwork.

    Back to old problem though, I need to beg borrow steal or skank the bootloader firmware for it.

     

    Last edit: Keith 2021-09-18
    • Anobium

      Anobium - 2021-09-19

      @Kieth cc: @williamroth

      I have emailed you details of the 27Q43 bootloader.

      Evan


      An insight to everyone.

      At the start of this year (2021) Bill and I created a project to use Great Cow BASIC to create bootloaders. We were able to complete the project for PIC10/12/16/18 in May. The program is Great Cow BASIC bootloader source program that uses the full capabilities of the compiler. This initial project uses MPASM to generate the HEX as we need to some complex parts of MPASM. Hence, you saw changes to the compiler and to Program Preferences to make this work.

      Then, as Microchip dropped support for MPASM for all new chips (including the Q43) we I started the project to add PIC-AS support to enable to pass a Great Cow BASIC source program into PIC-AS compiler to generate the HEX. This work was completed in June.

      Then, I added PIC-AS support to Program Preferences to make this work.

      Then, Bill has spent many hours revising the Great Cow BASIC bootloader source program to work with PIC-AS. This project was completed in August.

      So, we now have a Great Cow BASIC bootloader source program that can generate bootloaders for 8-bit PICs. A huge amount of work.

      You can now take advantage of these changes by

      1. Easy selection of assembler
      2. Ability to use MPLAB debugger and simulator for all chips
      3. A serial bootloader

      However, we are not planning to release the Great Cow BASIC bootloader source program as we do see this as a source of beer money! So, you can ask for a bootloader... and, we will ask for beer money!

       
      • Keith

        Keith - 2021-09-19
        @Anobium. I received your email about the TBL for 16F18346. I have replied to this about an hour ago. I'm waiting patiently for this as I want to breadboard and prove the circuitry. By the look of your message you already have a 16F27Q43 bootloader??
        
         
  • William Roth

    William Roth - 2021-09-19

    For those that may not know, PIC-AS is an Assembler, and is is the replacement for Microchip's MPASM assembler .

    PIC-AS is included in the latest version of XC8 which I believe is Ver 2.32. However, I have been told that a new release with some bug fixes is coming very soon.

    To use PIC-AS as the Assembler for Great Cow Basic:
    1) Download and install the latest version XC8
    2) Open The IDE and then open up the Programmer Editor ( Edit Programmer
    Preferences). Then select the Compiler tab.
    3) In the Assembler Box select PIC-AS
    4) Then open the Tool Variables tab
    5) Make sure that "picaslocation" points to where you installed XC8
    6) Click OK

    Now when you click on ASM - Both an MPASM AND a PIC-AS file will be generated. However when you click on HEX Or HexFlash The hex will be generated by PIC-AS.

    For those of you familiar with MPASM PIC ASSEMBLY you can open both the . ASM File and the .S file to compare them and see the differences.

    I cannot think of a any good reasons that the average user would need to use PIC-AS since GCASM works fine. However who knows what the future holds and what the next pitch that Microchip throws will be. Will it be another curve ball ?

    Having this in the toolkit may come in handy one day.

    William

     
    • Anobium

      Anobium - 2021-09-19

      I have 2.35 Compiler on test. So, expect a GA release in the next few weeks.

       
  • stan cartwright

    stan cartwright - 2021-09-19

    I seem to remember mpasm . I used it with a centronics parallel printer port programmer to flash pics. That was years ago. Not everyone wants to use microchip lab stuff. Well I don't.
    @WilliamRoth, The 18F27Q43 looks interesting but 64MHz is no big deal.
    OK using the pps app to define pins is great, it's all data sheets and knowing what your doing...
    it's not just programming in gcb basic ,it's tech stuff.
    Use a glcd and a lgt328 to see the difference. Speed freak, me , no I just like the board and gcb support and it's twice as fast as any other gcb ucontroller.
    Speed depends on what you want to do but we all try to make our code efficient and lean.
    If @Keith is doing lgt328 boards that are easy to program with gcb then interesting, depending on price.

    I got some microchip usb dev boards that need pps tool and it seems complicated compared to a uno/nano/lgt.

    Keep gcb easy to use. Don't overwhelm new users.

    Somewhere it should say why use an old pic with predefined pins. a new pic that needs lots of tech stuff setup or an arduino,.. depending on your knowledge.
    A 18f25k22 ie picaxe x2 when erased is easy to program with gcb and 1.5k ram is ok.

     

    Last edit: stan cartwright 2021-09-19
  • William Roth

    William Roth - 2021-09-20

    @Stan

    This thread was specifically related to a project for PIC micro-controllers and TinyBootloader.

    If you want to extol the virtues of LGT you should do that elsewhere. Start a new thread about it and let's get it over with.

    This thread is not about you, not about what you hate or don't hate, and is unrelated to anything to do with the LGT chip.

    I for one would really appreciate it if you stopped hijacking nearly every thread here with your incessant comments extolling LGT. We all get that it is very fast. So please stop it.

    William

     

    Last edit: William Roth 2021-09-20
    • stan cartwright

      stan cartwright - 2021-09-21

      @William. Sorry if I've upset you. That was not my intention.
      It was @Keith who posted in this thread about lgt boards he had designed with the intention of using a bootloader, which I found interesting.

      Looking at help threads it seems one needs to know a bit about data sheets for using the PPS tool and setting the pins function using newer pics..

      Apart from microchip usb dev boards for newer pics, I only have old pics and the 18f25k22 runs at 64MHz which is as fast as the newer pics.

      I have been emailing a @Walt Perko who posted a thread. A picaxe/ stamp user wanting to use gcb.
      He ordered five PIC18F27Q4 because that was the minimum order from cpc/farnell/RS,
      whatever and is telling me he is emailing a team gcb person to get it working as it's not ready yet....
      I told him to get a uno because it works so well with gcb and the pics he chose were going to be difficult to use for a new gcb user.
      I think the more people using gcb the better so suggested boards that don't need data sheets.
      I don't think you're extolling the 18F27Q43 , just recommending it.
      12bit a-d...same as lgt.
      It's not for a beginner though and there will probably something not working correctly found soon. That's the pic. Problems will be explained in the usual need to be a pic expert to understand way.

      William, if I "extoll" any thing, it's a uno/nano over a pic and pickit for a newcomer to gcb.
      I've always had a feeling gcb was for pics only and adding "arduino" was a chore but since most stuff I've posted is mega328p, I've noticed that @Anobium posts demo examples using mega328p rather than pic examples often.

      Anyway, someone worked getting the lgt to work with gcb so shame not to use it or why would they bother if no one uses it?

      I won't bother posting the game I'm coding using lgt as not to offend anyone.

       
  • William Roth

    William Roth - 2021-09-21

    @Stan

    You missed the point. I am NOT saying not to post about AVR or LGT. I am simply asking you to try to stay on topic. If a thread is is about Cows we don't need to jump in and start talking about how great Horses are.

    By all means post your game. I know you have spent a lot of time and effort on it. And it will a good way to showcase the LGT 328, Touchscreen, and GLCD . But I suggest you not post it on a thread where someone is asking for help with a PIC Bootloader.

    William

     

    Last edit: William Roth 2021-09-21
  • stan cartwright

    stan cartwright - 2021-09-21

    Fairynuff. Keith's posts seemed relevant but not pic related?? dunno..
    The idea of a bootloader is it is serial and just 2 wires and an interface to gcb?
    I'm not the brightest crayon in the box so a lot of gcb is over my head.
    For pics this seems good as no pickit needed. Arduinos... any point?
    I'll not post so much from now... The joys of building an ebike... cos mine was stolen.
    The nostalgia of removing the cranks, etc.
    gcb is more fun .

     
  • William Roth

    William Roth - 2021-09-21

    As I understand it, Keith's project is to make a "nano like" board that can be programmed using one of many USB/TTL adapters that many folks may have laying around. I have about 8 of them around here. Genuine FTDI, fake FTDTI, CP2102, CP2104, and CH340. All work well with TinyBootloader+. (The CP2104 does not require a crystal).

    The Bootloader APP uses TTL serial ( non inverted) to communicate with the Bootloader firmware programmed into the chip. The communication is bidirectional. The TBL App sends a packet of data, and the chip responds with an ACK if all is well (Checksum Good). So , it uses two 2 I/O's on the target Chip. These pins are available for use after programming.

    The the CGB code to generate the firmwares was written by either Evan (16FChips) or by me (18F Chips). It was written in GreatCowBasic, where GCB is used as a wrapper around Assembly Language. The firmware code (hex) is very compact and in many cases takes up less than 200 bytes( 100 Words) of Program Memory on the target chip.

    William

     
  • Keith

    Keith - 2021-09-21

    PPS Tool issue. This is driving around the bend ! I have checked and double checked the XML chip definitions and the XML file for 16F1937 is there. It is also present in the manifest but the PPS Tool refuses to list it in the dropdown. Any suggestions as to what I'm doing wrong???

    Keith

     
    • Anobium

      Anobium - 2021-09-21

      1937 is not a PPS chip

       
      • Keith

        Keith - 2021-09-21

        That's put a hole in my bucket. Pity really as a while back William wrote a bootloader for it - back to the slate and my stick of chalk.

         
  • stan cartwright

    stan cartwright - 2021-09-22

    Any demos of installing tiny bootloader with gcb, youtube maybe?
    I got a 18f25k22 and pickit 2 and 3 to experiment with.
    How to program the bootloader. use pickit2?

    When/if it's flashed to the pic then then to flash a compiled gcb hex file needs more explanation.
    On a 18f25k22 do I use the same clk/data pins as connected to pickit2 but connected to rs232 or usb to ttl adaptor?

    I then would not know how to send the hex file to the pic ... ie. is there a windows app to do it?

    I can't see any integration in program preferences for tiny bootloader.

     

    Last edit: stan cartwright 2021-09-22
  • William Roth

    William Roth - 2021-09-24

    @Stan

    "Any demos of installing tiny bootloader with gcb, youtube maybe?" 
    

    TinyBootloader+ is already included with the GCB installation, there is nothing to "install"
    See the "TinyBootloader" folder in your GCB installation. There are no videos that I am aware of, but the TinyBootloader folder includes a chm help file as well as a DOCS folder with relevant docs to help you along. Have you looked at the Help or any of the docs yet ?**

    "I got a 18f25k22 and pickit 2 and 3 to experiment with.
    How to program the bootloader. use pickit2?"
    

    Just like any other PIC would be programmed using the Pickit2 Graphical User Interface( GUI)

    1) Connect the PIC Chip to the PICKit2 Programmer
    1) Open the GUI
    2) Select the correct ChipFamily/Chip ( or use AutoDetect).
    3) Import the hex file
    4) Click on "Write"

    For more information on how to use the PICKIT GUI there is a User's Guide in the Pickit2 Folder. If you have PickitPlus Software it is in the PickitPlus Folder.
    Suggest you read it.

    "When/if it's flashed to the pic then then to flash a compiled gcb
    hex file needs more explanation."
    

    It is flashed like any another chip would be flashed. Select the proper programmer in Programmer Preferences then click "hex flash".

    On a 18f25k22 do I use the same clk/data pins as connected to pickit2
    but connected to rs232 or usb to ttl adaptor?
    

    No. The chip is programmed via its internal USART. The chips TX and RX pins are connected to a USB/TTL adapter's respective RX and TX pins. You cannot use RS-232 voltage levels or a PC serial port unless the voltage levels are "clamped" and the signal is inverted.

    I then would not know how to send the hex file to the pic ... ie. is
    there a windows app to do it?
    

    Yes.

    The hex file can be sent to a chip in one of two ways.

    1) Open the TinyBootloader executable( Windows App) in the TinyBootloader Folder . Select the hex file. Select the correct comport for the USB/TTL adapter. Select the correct baud rate. Then click on Write.
    2) From the IDE ... Open Programmer Preferences. Look for TinyBootloader then drag it to the top. There are no command switches to set. Then "OK".

    Before programming with Hex/Flash you must first configure TinyBootloader to use the correct comport and baud rate. Do that once using the TinyBootloader executable. Then close it. The settings will be persistent. Now you can program normally using Hex Flash

    I can't see any integration in program preferences for tiny bootloader.
    

    Look again. TinyBootloader is included in the list of programmers in Programmer Preferences

    William

     

    Last edit: William Roth 2021-09-24
  • stan cartwright

    stan cartwright - 2021-09-24

    @William - Thank you for explaining... and yes, there is Tinybootloader in programming preferences. How did I not see it!?

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.