Great. Glad you're up and running.
If you notice anything funny as you add your real code, just yell.
There's a lot that's changed with these new chips so the libs may need some massaging.
Search found 1473 matches
- Tue Jan 23, 2024 10:06 pm
- Forum: IDE
- Topic: CONFIG GENERATAOR FOR 18F27Q84
- Replies: 5
- Views: 1664
- Tue Jan 23, 2024 1:12 pm
- Forum: IDE
- Topic: CONFIG GENERATAOR FOR 18F27Q84
- Replies: 5
- Views: 1664
Re: CONFIG GENERATAOR FOR 18F27Q84
My mistake, Garry. I forgot I'm using an updated set of programs with some new features. Remove the DEBUG for the time being. Try something simple first just to verify the settings and programming, something like this should work if you have a pin/LED you can toggle... Device = 18F27Q84 Clock = 64 C...
- Sun Jan 21, 2024 11:11 pm
- Forum: IDE
- Topic: CONFIG GENERATAOR FOR 18F27Q84
- Replies: 5
- Views: 1664
Re: CONFIG GENERATAOR FOR 18F27Q84
Here's some background on this... The Q83/Q84 actually have 35 CONFIG registers, located from $300000-$300022 However, there's a problem. In absolute mode, the MPASMX assembler won't let you use the 'CONFIG' directive with >16 config bytes... past that you get random assembly errors, MPASMX blows up...
- Thu Dec 21, 2023 1:36 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
You can always start a different thread about using the UMC if you like. There's no different forum, just the wiki page and the info found in the swordfish MCLoader\UMC folder. With UMC, you build your app code as you would normally. When you program the UMC code into the uC, the RESET vector will p...
- Tue Dec 19, 2023 2:25 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
There's the MicrocodeLoader (MCLoader) that comes with SF. If you use UMC mode you can create and build files for any configuration. It's a simple serial bootloader that resides in high-memory. Checkout https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.UMCLoader You can access the help fi...
- Wed Dec 13, 2023 2:51 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
The 28-pin parts are pin compatible, so you should have no hdw issues replacing a K22 with a Q43.
For whatever reason they haven't released any new parts with >= 64 pins in a while... I think the last one was the 18F6xK40, and that was before they added the hardware flow control feature.
For whatever reason they haven't released any new parts with >= 64 pins in a while... I think the last one was the 18F6xK40, and that was before they added the hardware flow control feature.
- Tue Dec 12, 2023 11:10 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
If you do switch, check out the 18F27Q43... it has a little bit of everything, along with 5 UARTS and 8K of RAM.
The only downside is the I2C peripheral. Since it doesn't have an MSSP you'd have to use one of the software I2C modules with it.
The only downside is the I2C peripheral. Since it doesn't have an MSSP you'd have to use one of the software I2C modules with it.
- Mon Dec 11, 2023 3:39 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
I forgot to mention... if you're polling TRMT you may need an additional delay before disabling the TX.
TRMT gets set half way through the STOP bit, so if you don't have external failsafe biasing resistors the STOP bit will get cutoff too soon.
You need an additional 1/2 bit of delay time.
TRMT gets set half way through the STOP bit, so if you don't have external failsafe biasing resistors the STOP bit will get cutoff too soon.
You need an additional 1/2 bit of delay time.
- Mon Dec 11, 2023 3:13 pm
- Forum: User Modules
- Topic: rs-485
- Replies: 12
- Views: 48267
Re: rs-485
Unfortunately, on most PIC18 devices the TRMT status bit must be polled... there's no interrupt associated with it. Some of the newer devices have hardware flow control (Q40/41, Q43, etc) that can do the job. If you don't have one of these then you have to do it manually... either wait some amount o...
- Thu Dec 07, 2023 3:08 pm
- Forum: Modules
- Topic: HPWM16 - 16bit hardware PWM module
- Replies: 0
- Views: 17217
HPWM16 - 16bit hardware PWM module
Here's a preview of the 16-bit hardware PWM module for devices with a PWM module (Q family). These devices have multiple PWM modules with up to 2 outputs each, so a single HPWM16.bas instance can provide up to 8 PWM outputs depending on the device and configuration. main_ex1.bas // HPWM16 example de...
- Fri Nov 17, 2023 12:37 pm
- Forum: Modules
- Topic: HPWM/HPWM2/HPWM3 hardware PWM modules
- Replies: 16
- Views: 81616
Re: HPWM/HPWM2/HPWM3 hardware PWM modules
I just thought i would report it in case anyone else has this problem. And thanks for that! I hadn't noticed the two register writes so I've modified the files to account for it. The registers are double-buffered, but I think one of the issues is that it can take several cycles to perform the duty ...
- Wed Nov 15, 2023 4:08 pm
- Forum: Modules
- Topic: HPWM/HPWM2/HPWM3 hardware PWM modules
- Replies: 16
- Views: 81616
Re: HPWM/HPWM2/HPWM3 hardware PWM modules
ok, so I've looked at a number of different methods for updating the duty cycle registers, and the worst is definitely the algorithm that's in the current HPWM.bas module where it ends up writing to CCPRxL twice. That's a pretty straight-forward thing to fix. But, that's not the whole story. The 10-...
- Wed Nov 15, 2023 12:32 am
- Forum: Modules
- Topic: HPWM/HPWM2/HPWM3 hardware PWM modules
- Replies: 16
- Views: 81616
Re: HPWM/HPWM2/HPWM3 hardware PWM modules
So, it seems that it may not be the sequence so much as the timing of when you can update the registers in order to get glitchless operation. I'll look at it a little closer tomorrow.
- Tue Nov 14, 2023 2:43 pm
- Forum: Modules
- Topic: HPWM/HPWM2/HPWM3 hardware PWM modules
- Replies: 16
- Views: 81616
Re: HPWM/HPWM2/HPWM3 hardware PWM modules
Seems like an easy way to fix this is to add a cast to the shift... Public Sub SetDuty1(pDuty As Word) CCPxCON.bits(5) = pDuty.1 // 2 lsb's go to DCxB[1:0] CCPxCON.bits(4) = pDuty.0 CCPRxL = byte(pDuty >> 2) // adding cast avoids two writes to CCPRxL End Sub Would you mind checking this out and see ...
- Tue Nov 14, 2023 2:03 pm
- Forum: Modules
- Topic: HPWM/HPWM2/HPWM3 hardware PWM modules
- Replies: 16
- Views: 81616
Re: HPWM/HPWM2/HPWM3 hardware PWM modules
That's interesting... I never noticed that. The difference is in how it codes the 'pDuty >> 2' statement. In the hpwm.bas SetDuty() routine (and your SetDuty1 routine) it has this: ?I000043_F000_000026_P000140 ; L#MK CCPRxL = pDuty >> 2 RRCF F0_U16H,0,0 MOVWF PRODL,0 RRCF F0_U16,0,0 MOVWF CCPR1L,0 <...