Thread: Re: [Flashforth-devel] ...transition from PIC18 FlashForth to dsPIC33E, can I buy a clue?
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2015-03-22 21:57:46
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">The pic33e series has its own config file.</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">P33e_config.inc</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">That would be a good place to start;-)</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">Mike</p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>craig bair<dab...@ya...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sun, 22/03/2015 22:53</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>fla...@li...;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] ...transition from PIC18 FlashForth to dsPIC33E, can I buy a clue?</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>I dearly love the ease of development and performance on PIC18F chips, especially the xxK22 series. I've been handed a dsPIC33EP128MC202 to drive a couple of sensors so of course the first thing I think of is "Why, toss FlashForth on it. This is what it's for." It didn't take too long to hook it up to the PICkit3 after finding the default PGMCLK & PGMDAT pins (even though they're not called that), find all of the power and ground pins scattered all around it, and figure out the right config file and how to invoke it with the trusty old MPLab-IDE (8.92 still works appearently). I did some scrounging through the widely scattered Microchip Docs, I decided that the settings called out for the dsPICFJ129GP802 at the top of the p33_config.inc file should be a close enough starting point. It assembled up, programmed up with no arguement, and it just sat there. Since it's quite likely that I don't understand the pin-mapping mechanism, I started around the pins with a scope looking for the Console Output hitting the MCLR and watching for a few seconds and not seeing anything that looked like a UART. Ok, next step... Since the FOSC stuff looks like what the dsPIC33E FSM calls out for using the internal FastRC with PLL, I'm guessing that I don't need an external oscilator and I begin playing with the IDLE MODE and CPU LOAD settings to try and get the CPU LOAD LED to give me a heartbeat like I did when learning my way around the PIC18-s. No joy in Mudville, I'm not seeing any activity on any pin. As usual, when I get desperate enough to post to the mailing list I've concluded that I'm missing something basic that I probably should see, but it's sitting in my blind-spot. I'm open to suggestions as to what to try. Can anyone help me get this thing off of ground zero? (The first chip is always the hardest...(grin)). Oh, if it makes a difference, I'm using the flashforth-master.zip that I downoaded from Git-Hub on Nov 23, last year. Thanks for your attention, craig bair ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div> |
From: craig b. <dab...@ya...> - 2015-03-23 10:36:49
|
Yup, I missed that... I'll give it a try right away. Thanks Mike! craig |
From: craig b. <dab...@ya...> - 2015-03-24 22:26:46
Attachments:
configbits.txt
|
Mike, Thanks again for the pointer, getting the right config file DOES make a difference (grin). I've gotten the 33EP to program with a couple tweaks. The flash size number didn't make sense to me so I cut the example in half on the theory that a 128 chip should use half of what was called out for a 256. Memory size, ditto. Since the baudrate was set down to 9600 for the console, I switched it to xon/xoff to simplify trying it out. I also activated the CPU-Activity LED as an indicator that the processor was running. Eventually, it proved to be a serious issue with a cheap breadboard that was causing much of my problems, but now that it appears to be running, I've hit another snag... I found the console pins with my trusty 3v-logic-FTDI cable and a systematic test of available pins and had communication with it. Then I changed the baud-rate, re-assembled, and reprogrammed it and it stopped running entirely. I put the code back and tried again, still nothing, not even the CPU-blip. I probably should have dumped the flash to a hex-file for reference, but appearently I got overconfident... I can still read avd write it through PGEx3 pair so I'm still playing with it. Reloaded a fresh copy of p33e_config.exe and started tweaking from scratch. Do these config bits look right? All those Zeros bother me. (attaching file) Thanks for your patience, craig |
From: Mikael N. <mik...@fl...> - 2015-03-25 04:40:14
|
You mentioned earlier that you are using MPLAB 8. I thought that these new chips are only supported by MPLABX. I am using MPLABX and the XC16 compiler these days. When I assemble with your chip selected, I get mostly FFFF in the config bits. 157F0 = FFCD 157F2 = FFFF 157F4 = FFFF 157F6 = FFFF 157F8 = FFF9 157FA = FFFF |
From: craig b. <dab...@ya...> - 2015-03-25 11:04:00
|
I had noticed the change (grin), but my high-end machine is a Centrino Core-Duo with 4 gig ram running XP... Java based heavy programs could only run slower if they went backwards. I'll have to "upgrade" at some point if I don't retire first. Tough call, that. I really hate wasting instruction cycles. I'm not sure why the config-bits are genning up the way they do, so I'll just feed your numbers straight in and see what happens. Once again, many thanks sir! You are truely a gentleman and a scholar. craig |
From: craig b. <dab...@ya...> - 2015-03-25 12:58:12
|
There is mud in Joyville... The medieval solution seems to have glossed over the problem sufficiently for now. Resolution: commented out all logical config setting lines after examining the Microchip p33ep128mc202.inc file to check syntax, added these lines to the p33e_config.inc: ; ; BRUTE-FORCE CONFIG-BITS in MPLAB v8.92 config __FICD, 0xFFCD ;157F0 = config __FPOR, 0xFFFF ;157F2 = config __FWDT, 0xFFFF ;157F4 = config __FOSC, 0xFFFF ;157F6 = config __FOSCSEL, 0xFFF9 ;157F8 = FFF9 config __FGS, 0xFFFF ;157FA = ; did a Make All. The config bit clearing that was occurring went away except for the FGS (0x157FA) which stubornly remains set at 0xFFCF... Fortunately that doesn't seem to bother anything I can see yet, the chip immediately comes up and runs. Many Thanks again for the assist. Hopefully these chips will start to make more sense to me as I work with them more. craig |
From: <mik...@fl...> - 2015-03-23 07:11:48
|
Forgot to mention that you need the latest FF version. The E version support was introduced early 2015. I have not stepped the FF version number but a the date of the change is visible in the startup. To see what has changed it helps to browse the GIT version history which can be found here. http://sourceforge.net/p/flashforth/code/ci/master/tree/ BR Mike On 22.03.2015 23:57, Mikael Nordman wrote: > The pic33e series has its own config file. > > P33e_config.inc > > That would be a good place to start;-) > > Mike > > Sent from my LG Mobile > > ------ Original message------ > > FROM: craig bair > > DATE: Sun, 22/03/2015 22:53 > > TO: fla...@li...; > > SUBJECT:[Flashforth-devel] ...transition from PIC18 FlashForth to > dsPIC33E, can I buy a clue? > > I dearly love the ease of development and performance on PIC18F > chips, > especially the xxK22 series. > > I've been handed a dsPIC33EP128MC202 to drive a couple of sensors so > of course the first thing I think of is "Why, toss FlashForth on it. > This is what it's for." It didn't take too long to hook it up to the > PICkit3 after finding the default PGMCLK & PGMDAT pins (even though > they're not called that), find all of the power and ground pins > scattered all around it, and figure out the right config file and how > to invoke it with the trusty old MPLab-IDE (8.92 still works > appearently). I did some scrounging through the widely scattered > Microchip Docs, I decided that the settings called out for the > dsPICFJ129GP802 at the top of the p33_config.inc file should be a > close enough starting point. It assembled up, programmed up with no > arguement, and it just sat there. Since it's quite likely that I > don't > understand the pin-mapping mechanism, I started around the pins with > a > scope looking for the Console Output hitting the MCLR and watching > for > a few seconds > and not seeing anything that looked like a UART. > > Ok, next step... Since the FOSC stuff looks like what the dsPIC33E > FSM > calls out for using the internal FastRC with PLL, I'm guessing that I > don't need an external oscilator and I begin playing with the IDLE > MODE and CPU LOAD settings to try and get the CPU LOAD LED to give me > a heartbeat like I did when learning my way around the PIC18-s. No > joy > in Mudville, I'm not seeing any activity on any pin. > > As usual, when I get desperate enough to post to the mailing list > I've > concluded that I'm missing something basic that I probably should > see, > but it's sitting in my blind-spot. I'm open to suggestions as to what > to try. Can anyone help me get this thing off of ground zero? (The > first chip is always the hardest...(grin)). > > Oh, if it makes a difference, I'm using the flashforth-master.zip > that > I downoaded from Git-Hub on Nov 23, last year. > > Thanks for your attention, > craig bair > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your > hub > for all > things parallel software development, from weekly thought leadership > blogs to > news, videos, case studies, tutorials and more. Take a look and join > the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: <mik...@fl...> - 2015-03-23 16:59:11
|
OOPS, Actually the 24E/33E version support was introduced in August 2014. Anyway, you need to use the p33e_config.inc file for configuration. On 23.03.2015 09:11, mik...@fl... wrote: > The E version support was introduced early 2015. > |