Hi Rob, just a thought, I'm not asking anything. I recall it were written a lot of pwm library versions. I do not know if the last one allows you to set the pwm frequency, which is important. Finally you can do that from registers, anyway.
Happy holidays! On Sat, Dec 21, 2024, 10:52 Rob CJ <[email protected]> wrote: > Hi Rob_H, > > A late reaction but I was away last week. > > About PWM issue #208. This year I worked on this - not remembering that > this issue was reported - and added 16-bit PWM up to 12 channels. This is > not yet in the current release but it is in the bee-packages. > > If you look in the changelog of the bee-package you find this: > > peripherals: > - Update of pwm_pwm1.jal, pwm_pwm2.jal, pwm_pwm3.jal, pwm_pwm4.jal, > pwm_pwm5.jal, pwm_pwm6.jal. > Added 16-bit PWM functionality in addition to the existing 10-bit PWM > functionality. > - Added pwm_pwm7.jal, pwm_pwm8.jal, pwm_pwm9.jal, pwm_pwm10.jal, > pwm_pwm11.jal, pwm_pwm12.jal > Includes 10-bit PWM and 16-bit PWM. > - Update of pwm_hardware.jal. Added PWM7..PWM12. > - Update of pwm_common.jal. Added 16-bit PWM functionality and extended > the prescaler ranges. > 2-bit prescaler was extended with prescale 64 and 3-bit prescaler > supports prescale 1..128. > > I think that when a new Jallib release is made - next year - this issue > can be closed, agree? > > Kind regards, > > Rob_J > > ------------------------------ > *Van:* [email protected] <[email protected]> namens vsurducan > <[email protected]> > *Verzonden:* zondag 15 december 2024 16:26 > *Aan:* [email protected] <[email protected]> > *Onderwerp:* Re: [jallib] Re: pragma target clockouten issue? > > Thank you for the offer. I've taken a look at the PIC16F1615 and it has a > 10bit PWM. > PIC12F1572 has a 16bit PWM which can be used in too many modes (standard, > set on match, center-align). Actually I need the standard PWM just to feed > clock for the CWG (complementary waveform generator) and that I partially > understand it (see the code posted in the other message). > However I would be interested to see your libraries, I always I'm curious > to learn new things, perhaps including them in jallib package would be a > good idea. > > Vasile > > > On Sun, Dec 15, 2024 at 12:28 PM Rob Hamerling <[email protected]> > wrote: > > > Hi Vasili, > > Not about clockout, but there is an open Jallib issue (#208) with respect > to PWM libraries. It may contain information that could be of help to > you. A few years ago I made some 'private' libraries, to be able to use > PWM with 16f161x, 16f184xx, 16f188xx, 18f27k40. I don't know if these are > usable for the 12F1572. If you are interested I could send these to you. > > Regards, Rob_H! > > > > On 15-12-2024 08:33, vsurducan wrote: > > Solved in a weird mode. The following code is sending OSC/4 on clkout pin > if A4 is ON inside a loop. > Without a loop, A4 is permanently low. > > include 12f1572 -- target PICmicro > -- > ;pragma target clock 32_000_000 -- oscillator frequency > pragma target clock 8_000_000 -- oscillator frequency > -- > pragma target OSC INTOSC_NOCLKOUT -- internal oscillator > pragma target PLLEN DISABLED -- PLL off > pragma target CLKOUTEN ENABLED -- clock output enabled > pragma target WDT DISABLED -- watchdog > pragma target BROWNOUT DISABLED -- no brownout reset > pragma target LVP ENABLED -- low voltage programming > pragma target MCLR EXTERNAL -- external reset > -- > > OSCCON_SCS = 0 -- select primary oscillator > OSCCON_IRCF = 0b1110 -- 8 MHz > ;OSCCON_SPLLEN = ENABLED -- software PLL on 8x4=32MHz > OSCCON_SPLLEN = DISABLED - 8Mhz OSC > -- > enable_digital_io() -- make all pins digital I/O > pin_A4_direction = output -- output osc/4 > alias clkout is pin_A4 -- alias for clkout pin > > forever loop > clkout = ON > end loop > > > On Sun, Dec 15, 2024 at 9:02 AM vsurducan <[email protected]> wrote: > > Ok, pragma target clkouten is programming the configuration word as it > should. Reading hex with a programmer it looks ok. > However on the RA4 pin there is no clock/4. > > > On Sat, Dec 14, 2024 at 1:15 PM vsurducan <[email protected]> wrote: > > Hi Rob, > I'm trying to understand the PWM in PIC12F1572, for which the pwm library > can not be used. > > I need to see the system clock. > The problem is that I can not make it visible on clockout pin. The > following code should do it? > > include 12f1572 -- target PICmicro > -- > ;pragma target clock 32_000_000 -- oscillator frequency > pragma target clock 8_000_000 -- oscillator frequency > -- > pragma target OSC INTOSC_NOCLKOUT -- internal oscillator > pragma target PLLEN DISABLED -- PLL off > pragma target CLKOUTEN ENABLED -- clock output enabled > pragma target WDT DISABLED -- watchdog > pragma target BROWNOUT DISABLED -- no brownout reset > pragma target LVP ENABLED -- low voltage programming > pragma target MCLR EXTERNAL -- external reset > -- > > OSCCON_SCS = 0 -- select primary oscillator > OSCCON_IRCF = 0b1110 -- 8 MHz > ;OSCCON_SPLLEN = ENABLED -- software PLL on 8x4=32MHz > OSCCON_SPLLEN = DISABLED - 8Mhz OSC > -- > enable_digital_io() -- make all pins digital I/O > pin_A4_direction = output ; output osc/4 > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtqos%3DsRusP0SVrcELXKuOOgCgETpza6cW_v4vWj4%3DwmA%40mail.gmail.com > <https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtqos%3DsRusP0SVrcELXKuOOgCgETpza6cW_v4vWj4%3DwmA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > -- > *Rob H*amerling, Vianen, NL > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jallib/7fe5970a-07e7-4941-8208-c58b9061e401%40gmail.com > <https://groups.google.com/d/msgid/jallib/7fe5970a-07e7-4941-8208-c58b9061e401%40gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtE8ZXbMGRU2G1-36WdyRaOx8WbPL7dch-xMgF%3D-CiWhA%40mail.gmail.com > <https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtE8ZXbMGRU2G1-36WdyRaOx8WbPL7dch-xMgF%3D-CiWhA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/jallib/AM7PR02MB609811C87AEFD18E4B9B774EE6002%40AM7PR02MB6098.eurprd02.prod.outlook.com > <https://groups.google.com/d/msgid/jallib/AM7PR02MB609811C87AEFD18E4B9B774EE6002%40AM7PR02MB6098.eurprd02.prod.outlook.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/jallib/CAM%2Bj4qsdQsSDkYFLfYDN6-Rnzz_tcJNzaBEv-WS_KjFwrNgqqw%40mail.gmail.com.
