18F25K22 Support [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: 18F25K22 Support [solved] (/showthread.php?tid=44) |
18F25K22 Support [solved] - Mitchy - 2011-02-12 Hi Mikael, Graham here from Digital DIY. With the feature packed 18F25K22 now fully supported by Microchip, it is becoming the PIC of choice for PICAXE, Amicus and Xino. I have a few of them to test with, although I found there were some issues with the ds30 bootloader. First thing I noticed - 'Device.INC' has a duplicate pre-compile option: Code: ifdef __18F25K22 Code: ;------------------------------------------------------------------------------ I should have added that I am using MPLAB 8.63 RE: 18F25K22 Support - Mikael Gustavsson - 2011-02-12 Hello m8! Is it an external crystal? I would try without pll and boren and and a lower baud rate. You missed this one: #define DEV_MODE 1 ;xxx delete or comment this line RE: 18F25K22 Support - Mitchy - 2011-02-12 Hi Mikael, cheers for getting back to me. Yea, the Amicus board makes use of an external 16Mhz crystal. It's got to be something simple, surely! Attached is a modified version of ds30 specifically for use with K20 and K22. The bootloader configuration depends on the device selected from within MPLAB. The bootloader works fine with the K20, and not so well with K22 selected (timeouts). Any thoughts? Feel free to make changes to the software - I can test it here if you do not have any K22's. firmware PIC18F.zip (Size: 59.29 KB / Downloads: 32) It's also worth pointing out that I made the changes you suggested earlier, and that PORTC<7:6> are configured as digital if the K22 is selected. RE: 18F25K22 Support - Mikael Gustavsson - 2011-02-12 It look osk, use an oscilloscope and verify oscillator frequency verify PIC tx baud rate verify rx baud rate on PIC rx pin You could also try to set the tris bits for u1 tx and rx correctly RE: 18F25K22 Support - Mitchy - 2011-02-13 Hi Mikael, Quote:You could also try to set the tris bits for u1 tx and rx correctly Will do, I've made a change in the user init section: Code: ; Enable digital i/o Attached is the updated ds30 program (still not working, though) firmware PIC18F.zip (Size: 57.96 KB / Downloads: 16) The K22 support has got me stumped. I only dabble with low level code - I much prefer to use a HLL such as Swordfish.. With that in mind, my fault finding capability is rather limited working with assembly! I made the following simple program for testing the K20 and K22 USART hardware. The only the config fuses change depending on which device is selected: Code: Device = 18F25K22 The program works perfectly fine with either K20 or K22 defined, and results with "Hello World" on the terminal program every second. Which is interesting, as the USART module is configured exactly the same between the Swordfish programs. Going a little further, and the SF USART initialisation looks much the same as what you have in the ds30 program. Attached are the assembly outputs for each variation of the above program (just in case you'd like to inspect the configuration between them?). K20+K22 ASM.zip (Size: 11.22 KB / Downloads: 23) Have you had any success with K22's in the past? There also appears to be a small bug in the GUI for the 18F25K22 - the device is listed twice in v1.3.14.0). RE: 18F25K22 Support - Mikael Gustavsson - 2011-02-14 No I haven't used a K22. Ok, interesting. Is still think you should use an oscilloscope to point the problem out: verify oscillator frequency verify PIC tx baud rate verify rx baud rate on PIC rx pin You could also add constant transmit in the firmware to verify PIC tx using the terminal in ds30 Loader. RE: 18F25K22 Support - moonshadow - 2011-02-17 I think a lot of people look forward to a solution because although compilers may cater for new PIC's they do not provide boot loaders until a much later date (if ever) and for educational applications I consider a boot loader essential. It is an interesting situation because I do not have the skill needed to create a boot loader for the 18F25K22 chip, nor can I find anyone who sells one. So Mikael, you have the ability to save both my sanity ... and the planet Hi!. John. @ Mitchy. I am not smart enough to know if this is relevant of not. "The default is 64MHz (16 mips), as it is using the internal x4 PLL with a 16MHz crystal." (from the Amicus forum by Les). Also ...."However, I have noticed that the latest Mpasm assembler supplied with the compiler seems to have an anomaly with its fuse configuration when using an 18F25K22 device. And instead of choosing the High speed oscillator, it's choosing the LP oscillator ........ Les". RE: 18F25K22 Support - Mikael Gustavsson - 2011-02-17 I still think you should use an oscilloscope to point the problem out: verify oscillator frequency verify PIC tx baud rate verify rx baud rate on PIC rx pin or send me a board and i will fix it. RE: 18F25K22 Support - Mitchy - 2011-02-19 Righto, thanks to the help of Ettore from the Amicus site, we've got a working version of ds30 for PIC18F25K22 (attached). The changes needed:
@moonshadow Fuse configurations are manually defined in settings.inc - the attached firmware will work on your Amicus18 board with an 18F25K22 installed [Edit] Reverted the firmware version back to 2.0.3 so that it functions with the GUI/Console correctly. RE: 18F25K22 Support - moonshadow - 2011-03-17 @moonshadow Fuse configurations are manually defined in settings.inc - the attached firmware will work on your Amicus18 board with an 18F25K22 installed [Edit] Reverted the firmware version back to 2.0.3 so that it functions with the GUI/Console correctly. [/quote] @Mitchy. Sorry for the delay, I have been having a 'blank' period. I tried this and it does work, but I ran into issues. I am not sure if I generated them with my own incompetence, but decided to post them here just in case. Incidentally I am not using the Amicus board, but the one for the Children's project. I am using the Amicus compiler. 1. The first is that the above procedures* were written for the 18F25K20 chip, but also appear to apply to the 18F25K22 chip. 2. Most of the issues found with the DS30 concerned the operation of the drop down DOS window. 3. If the target board is not powered during a download, the bootloader search is bypassed and the DOS screen closes giving no time to read any warnings. 4. If the download cable is not plugged in during a download, the bootloader search is bypassed and the DOS screen closes giving no time to read any warnings. 5. During a normal download, it was found that very often the bootloader search was bypassed, or prematurely ended. This was of major concern because the DOS screen disappears so fast, it is impossible to read the warnings at the bottom of the window. The end result is that one thinks that there has been a download, when there hasn't. Again, the DOS screen closes down too fast to read any warnings. 6. If, in the settings box, the download cable is not plugged in, it obviously will not show. If it is then plugged in, one has to exit and then re-enter the box in order to detect the cable. 7. It may very well be that the above conditions were caused by my own incompetence. jk * http://homepage.ntlworld.com/moonshadow/New_Folder/ds30_bootloader.htm RE: 18F25K22 Support [solved] - rotting79 - 2013-10-08 Hey there hope can still write in this one... anyway, I've been using the 18F45K22, 18F44K22 with success, and now I'm trying to use the 18F24k22, but nothing (should be the same, or almost, right?) I've tried to clear the ASELC, but nothing and when I tried to make the C7 pin an input, this message came out (picture attached). I've program the PIC already, just to see if it works, and yes, it is working, so may be the bootloader the one that doesn't work.... I guess Here is the text that i modify, so u can check them out, maybe u can see something that i don't config FOSC = INTIO67 ;Internal oscillator block config PLLCFG = OFF ;Oscillator used directly ( Disabled ) config PRICLKEN = ON ;Primary clock is always enabled config FCMEN = OFF ;Fail-Safe Clock Monitor disabled config IESO = OFF ;Oscillator Switchover mode disabled config PWRTEN = OFF ;Power up timer enabled config BOREN = OFF ;Brown-out Reset disabled in software config WDTEN = OFF ;Watch dog timer is always disabled. config PBADEN = OFF ;PORTB<5:0> pins are configured as digital I/O on Reset config HFOFST = OFF ;HFINTOSC output and ready status are delayed by the oscillator stable status config MCLRE = EXTMCLR ;MCLR pin enabled, RE3 input pin disabled config STVREN = OFF ;Stack full/underflow will not cause Reset config LVP = OFF ;Single-Supply ICSP disabled config XINST = OFF ;Instruction set extension and Indexed Addressing mode enabled config DEBUG = OFF ;Disabled config CCP3MX = PORTB5 ;P3A/CCP3 input/output is multiplexed with RB5 ....and..... ; Make uart pins digital ifdef ADCON1 ifndef DEV_MODE ; error Do you need to configura uart pins to be digital? If not, remove this line ifdef __18F24K22 clrf ANSELC movlw 0x80 movwf TRISC endif endif endif I'd put it down into test with a oscilloscope, and the GUI send the data, but the PIC never answers back, so any Idea? thanks in advance RE: 18F25K22 Support [solved] - Mikael Gustavsson - 2013-10-13 Hi, Please zip the boot loader MPLAB IDE project and post it here. What does your oscillator setup look like? RE: 18F25K22 Support [solved] - rotting79 - 2013-10-29 Hi, here is the zip file, now it is working, sadly to say, just download a old version of your software, change the PIC18F24K22, and it was working, no more the error as before (contact Mike....) at the end the new .hex file add two more words, but I actually don't know what was wrong, because I double checked and the config registers were the same, the baud set up was the same, pretty much else was the same.... anyway here is the zip file, just in case thanks again for the great soft... https://www.youtube.com/watch?v=B7z7BhY5WBA RE: 18F25K22 Support [solved] - Mikael Gustavsson - 2013-11-01 Can you please post the non working files as well. Thanks. |