Thread: [Flashforth-devel] PIC18 has been updated to compile with PIC-AS
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2022-01-08 07:18:20
|
Greetings. Microchip has dropped support of MPASM for new chips and new IDE versions. After a lot of work FF has been updated to compile with PIC-AS. MPASM support has been dropped in order to develop only one version of FF. Improvements include support for the Q41 and Q43 chips. Another improvement is the simultanous support for up to 3 UARTS. The linker files are not used anymore, but instead some PIC-AS command line options must be used. I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 18f16q41. Please report any bugs. Best wishes for the new year. Mikael |
From: Tristan W. <ho...@tj...> - 2022-01-08 16:38:26
|
Hello Mikael, That is fantastic news. Thank you. Can you tell me which version of PIC-AS/IDE are you using? Kind regards, Tristan On 08Jan22 08:40, Mikael Nordman wrote: > Greetings. > Microchip has dropped support of MPASM for new chips and new IDE versions. > After a lot of work FF has been updated to compile with PIC-AS. > MPASM support has been dropped in order to develop only one version of FF. > > Improvements include support for the Q41 and Q43 chips. > Another improvement is the simultanous support for up to 3 UARTS. > The linker files are not used anymore, but instead some PIC-AS command line > options must be used. > > I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 18f16q41. > Please report any bugs. > > Best wishes for the new year. > Mikael > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@fl...> - 2022-01-08 18:02:26
|
Hi Tristan. MPLABX 5.50 and 6.00 and PIC-AS 2.32. BR Mikael On 2022-01-08 12:06, Tristan Williams wrote: > Hello Mikael, > > That is fantastic news. Thank you. > > Can you tell me which version of PIC-AS/IDE are you using? > > Kind regards, > > Tristan > > On 08Jan22 08:40, Mikael Nordman wrote: >> Greetings. >> Microchip has dropped support of MPASM for new chips and new IDE >> versions. >> After a lot of work FF has been updated to compile with PIC-AS. >> MPASM support has been dropped in order to develop only one version of >> FF. >> >> Improvements include support for the Q41 and Q43 chips. >> Another improvement is the simultanous support for up to 3 UARTS. >> The linker files are not used anymore, but instead some PIC-AS command >> line >> options must be used. >> >> I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 >> 18f16q41. >> Please report any bugs. >> >> Best wishes for the new year. >> Mikael >> >> >> >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel >> > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |
From: Mikael N. <mik...@fl...> - 2022-01-08 18:25:16
|
Just upgraded to PIC-AS v2.35. And fantastically the listing file now expands the macros and shows a correct output. It was real pain to port FF with v2.32 whiich had a worthless listing file. On 2022-01-08 20:02, Mikael Nordman wrote: > Hi Tristan. > MPLABX 5.50 and 6.00 and PIC-AS 2.32. > > BR Mikael > > On 2022-01-08 12:06, Tristan Williams wrote: >> Hello Mikael, >> >> That is fantastic news. Thank you. >> >> Can you tell me which version of PIC-AS/IDE are you using? >> >> Kind regards, >> >> Tristan >> |
From: Mikael N. <mik...@fl...> - 2022-01-08 18:48:08
|
Using PIC-AS v.2.35 has just one 'minor' problem. The code does not work anymore :-( BR Mkael On 2022-01-08 20:25, Mikael Nordman wrote: > Just upgraded to PIC-AS v2.35. > > And fantastically the listing file now expands the macros and shows a > correct output. > > It was real pain to port FF with v2.32 whiich had a worthless listing > file. > > On 2022-01-08 20:02, Mikael Nordman wrote: >> Hi Tristan. >> MPLABX 5.50 and 6.00 and PIC-AS 2.32. >> >> BR Mikael >> >> On 2022-01-08 12:06, Tristan Williams wrote: >>> Hello Mikael, >>> >>> That is fantastic news. Thank you. >>> >>> Can you tell me which version of PIC-AS/IDE are you using? >>> >>> Kind regards, >>> >>> Tristan >>> > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |
From: Mikael N. <mik...@fl...> - 2022-01-08 19:42:56
|
Luckily there is only a small problem. When going from v2.32 to v2.35 the values are different for # PIC-AS 2.35 config PLLDIV = 3 config USBDIV = 2 # PIC-AS 2.32 config PLLDIV = 2 config USBDIV = 1 Still the same config1l value of 0x22 is generated. There was the same problem with 25k50 when going from MPASM to PIC-AS On 2022-01-08 20:47, Mikael Nordman wrote: > Using PIC-AS v.2.35 has just one 'minor' problem. > > The code does not work anymore :-( > > BR Mkael > > On 2022-01-08 20:25, Mikael Nordman wrote: >> Just upgraded to PIC-AS v2.35. >> |
From: Tristan W. <ho...@tj...> - 2022-01-09 13:39:23
|
I had some fun getting a NeoPixel ring to work with FlashForth (pic18) so I thought I would have a go writing it up. https://tjnw.co.uk/ws2812/index.html The Forth assembler is really neat. Kind regards, Tristan |
From: Mikael N. <mik...@fl...> - 2022-01-09 20:31:01
|
One useful thing to know. Ram addresses $f000 - $f00f are free for use in the access bank. These are not used by the FF kernel. So you can define $f000 constant neo.count [ neo.count a, movwf, ] and skip setting of the ram bank. BR Mikael On 2022-01-09 15:39, Tristan Williams wrote: > I had some fun getting a NeoPixel ring to work with FlashForth (pic18) > so I thought I would have a go writing it up. > > https://tjnw.co.uk/ws2812/index.html > > The Forth assembler is really neat. > > Kind regards, > > Tristan > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |
From: Peter J. <pe...@me...> - 2022-01-10 11:32:46
|
Mikael, It works nicely for the PIC18F26K22 at FOSC=64MHz if I change PLL to PLL_ENABLE on line 44 of p18f2x4xk22.inc. I have updated a couple of sections of the tutorial document at https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html to reflect your new code. I have yet to try some of the newer Q-family chips but I guess that new projects should use those. They look very capable. Cheers, Peter Jacobs On 8/1/22 4:40 pm, Mikael Nordman wrote: > Greetings. > Microchip has dropped support of MPASM for new chips and new IDE > versions. > After a lot of work FF has been updated to compile with PIC-AS. > MPASM support has been dropped in order to develop only one version of > FF. > > Improvements include support for the Q41 and Q43 chips. > Another improvement is the simultanous support for up to 3 UARTS. > The linker files are not used anymore, but instead some PIC-AS command > line options must be used. > > I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 18f16q41. > Please report any bugs. > > Best wishes for the new year. > Mikael > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Tristan W. <ho...@tj...> - 2022-01-10 15:08:44
|
That is good to know. I wanted to use a scratch register of some kind but did not know how. Kind regards and thanks, Tristan On 09Jan22 22:30, Mikael Nordman wrote: > One useful thing to know. > > Ram addresses $f000 - $f00f are free for use in the > access bank. These are not used by the FF kernel. > > So you can define > > $f000 constant neo.count > > [ neo.count a, movwf, ] > > and skip setting of the ram bank. > > BR Mikael > > On 2022-01-09 15:39, Tristan Williams wrote: > > I had some fun getting a NeoPixel ring to work with FlashForth (pic18) > > so I thought I would have a go writing it up. > > > > https://tjnw.co.uk/ws2812/index.html > > > > The Forth assembler is really neat. > > > > Kind regards, > > > > Tristan > > > > > > _______________________________________________ > > Flashforth-devel mailing list > > Fla...@li... > > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > -- > -- > Mikael > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Tristan W. <ho...@tj...> - 2022-01-11 07:53:13
|
But I must remember to use them in an interrupt safe way. Kind regards, Tristan On 10Jan22 14:09, Tristan Williams wrote: > That is good to know. I wanted to use a scratch register of some kind > but did not know how. > > Kind regards and thanks, > > Tristan > > On 09Jan22 22:30, Mikael Nordman wrote: > > One useful thing to know. > > > > Ram addresses $f000 - $f00f are free for use in the > > access bank. These are not used by the FF kernel. > > > > So you can define > > > > $f000 constant neo.count > > > > [ neo.count a, movwf, ] > > > > and skip setting of the ram bank. > > > > BR Mikael > > > > On 2022-01-09 15:39, Tristan Williams wrote: > > > I had some fun getting a NeoPixel ring to work with FlashForth (pic18) > > > so I thought I would have a go writing it up. > > > > > > https://tjnw.co.uk/ws2812/index.html > > > > > > The Forth assembler is really neat. > > > > > > Kind regards, > > > > > > Tristan > > > > > > > > > _______________________________________________ > > > Flashforth-devel mailing list > > > Fla...@li... > > > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > > -- > > -- > > Mikael > > > > > > _______________________________________________ > > Flashforth-devel mailing list > > Fla...@li... > > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@fl...> - 2022-01-12 15:07:52
|
Peter, Thanks for updating the guide. Maybe you can also update the PIC24 and AVR build chapters? Both build have changed. The PIC24-30-33 config bit are now set in a configs.c file. AVR is built with the AVR-AS (XC8) compiler. Also the names of the prebuilt hex files and the fuse values have changed. BR Mikael On 2022-01-10 13:32, Peter Jacobs wrote: > Mikael, > It works nicely for the PIC18F26K22 at FOSC=64MHz if I change PLL to > PLL_ENABLE on line 44 of p18f2x4xk22.inc. > > I have updated a couple of sections of the tutorial document at > https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html to > reflect your new code. > > I have yet to try some of the newer Q-family chips but I guess that > new projects should use those. They look very capable. > > Cheers, > Peter Jacobs > > > On 8/1/22 4:40 pm, Mikael Nordman wrote: >> Greetings. >> Microchip has dropped support of MPASM for new chips and new IDE >> versions. >> After a lot of work FF has been updated to compile with PIC-AS. >> MPASM support has been dropped in order to develop only one version of >> FF. >> >> Improvements include support for the Q41 and Q43 chips. >> Another improvement is the simultanous support for up to 3 UARTS. >> The linker files are not used anymore, but instead some PIC-AS command >> line options must be used. >> >> I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 >> 18f16q41. >> Please report any bugs. >> >> Best wishes for the new year. >> Mikael >> >> >> >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |
From: Peter J. <pe...@me...> - 2022-01-15 12:56:17
|
Mikael, I dusted off my other boards and updated those build and install sections. https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html#_building_for_the_pic24fv32ka302 I also tried to build and use FF on a PIC18F16Q40 by adapting your config for a 16Q41. Although I got the chip programmed and the interpreter starting ok, it would not write new definitions to flash memory. Here is a sample of the session with the programmer still attached to the ICSP pins. After exercising words, I sent a file containing my little flash-led text. FlashForth 5 PIC18F16Q40 01.01.2022 words p2+ p++ pc@ @p hi d. ud. d> d< d= d0< d0= dinvert d2* d2/ d- d+ dabs ?dnegate dnegate s>d rdrop endit next for in, inline repeat while again until begin else then if until, again, begin, else, then, if, not, nc, nz, z, br? dump .s words >pr .id ms ticks s0 latest state bl 2- ['] -@ ; :noname : ] [ lst does> postpone create cr [char] ( char ' abort" ?abort ?abort? abort prompt quit true false .st inlined immediate shb interpret source. >in tiu tib ti# number? >number a> >a ud/mod ud* sign? digit? find immed? (f) c>n n>c @+ c@+ place cmove word parse \ /string source user base pad hp task ulink bin hex decimal . u.r u. sign #> #s # digit <# hold up min max ?negate tuck nip / u*/mod u/ * u/mod um/mod um* 'key? 'key 'emit p+ pc! p! p@ r>p !p>r !p u> u< > < = 0< 0= <> within +! 2/ 2* >body 2+ 1- 1+ negate invert xor or and - m+ + abs dup r@ r> >r rot over swap drop allot ." ," s" (s" type accept 1 umax umin spaces space 2swap 2over 2dup 2drop 2! 2@ cf, chars char+ cells cell+ aligned align cell c, , here dp ram eeprom flash c@ @ c! ! sp. sp@ 2constant constant co: 2variable variable @ex execute key? key emit empty pps- pps+ btfss, btfsc, bsf, bcf, bra, rcall, call, goto, br3 br2 as3 as2 as1 rshift lshift ic, i, operator Fcy mtst mclr mset iflush pause turnkey is to defer value cwd u1- u1+ fl+ fl- >tblp literal int! ;i di ei scan skip n= ver warm i] [i andlw, movlb, movlw, movwf movf, w, a, rx1? rx1 tx1 exit marker ok<#,ram> -flash-led -flash-led ? marker -flash-led S FlashForth 5 PIC18F16Q40 01.01.2022 $c4c0 constant latc S FlashForth 5 PIC18F16Q40 01.01.2022 $c4c8 constant trisc S FlashForth 5 PIC18F16Q40 01.01.2022 : init 1 trisc mclr ; \ want RC0 as output trisc ? : do_output latc c@ 1 xor latc c! ; \ toggle RC0 latc ? : wait #500 ms ; S FlashForth 5 PIC18F16Q40 01.01.2022 : main init begin do_output wait again ; init ? main main ? When I remove the programmer and power up the microcontroller, it resets itself every couple of seconds. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC .P.n.P. FlashForth 5 PIC18F16Q40 01.01.2022 ESC Any hints as to what I am doing wrong? I have the microcontroller mounted on a bit of strip-board with the bare minimum of support so I may not be giving it the electrical environment that it needs. I will need to give it some thought... Cheers, Peter J. On 13/1/22 1:07 am, Mikael Nordman wrote: > Peter, > Thanks for updating the guide. > Maybe you can also update the PIC24 and AVR build chapters? Both build > have changed. > > The PIC24-30-33 config bit are now set in a configs.c file. > > AVR is built with the AVR-AS (XC8) compiler. > Also the names of the prebuilt hex files and the fuse values have > changed. > > BR Mikael > > > On 2022-01-10 13:32, Peter Jacobs wrote: >> Mikael, >> It works nicely for the PIC18F26K22 at FOSC=64MHz if I change PLL to >> PLL_ENABLE on line 44 of p18f2x4xk22.inc. >> >> I have updated a couple of sections of the tutorial document at >> https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html to >> reflect your new code. >> >> I have yet to try some of the newer Q-family chips but I guess that >> new projects should use those. They look very capable. >> >> Cheers, >> Peter Jacobs >> >> >> On 8/1/22 4:40 pm, Mikael Nordman wrote: >>> Greetings. >>> Microchip has dropped support of MPASM for new chips and new IDE >>> versions. >>> After a lot of work FF has been updated to compile with PIC-AS. >>> MPASM support has been dropped in order to develop only one version >>> of FF. >>> >>> Improvements include support for the Q41 and Q43 chips. >>> Another improvement is the simultanous support for up to 3 UARTS. >>> The linker files are not used anymore, but instead some PIC-AS >>> command line options must be used. >>> >>> I have tested with 18f14k50 18f25k50 18f2455 18f26k42 18f26k83 >>> 18f16q41. >>> Please report any bugs. >>> >>> Best wishes for the new year. >>> Mikael >>> >>> >>> >>> >>> _______________________________________________ >>> Flashforth-devel mailing list >>> Fla...@li... >>> https://lists.sourceforge.net/lists/listinfo/flashforth-devel >> >> >> >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@fl...> - 2022-01-16 11:35:01
|
There was an incompatibilty with the PIC-AS v2.35. A fix and configuration support for more Q series chips has been pushed to git. BR Mikael On 2022-01-15 14:56, Peter Jacobs wrote: > Mikael, > I dusted off my other boards and updated those build and install > sections. > https://pajacobs-ghub.github.io/flashforth/ff5-tutorial-guide.html#_building_for_the_pic24fv32ka302 > > I also tried to build and use FF on a PIC18F16Q40 by adapting your > config for a 16Q41. Although I got the chip programmed and the > interpreter starting ok, it would not write new definitions to flash > memory. |