You're very welcome :-) I want to correct myself about interrupts and jitter: I wrote about +/-2Tcy. That's the hardware part. But then there's JALs interrupt handling: If, say, serial_hw_int_cts is transmitting a string and has just finished one byte shortly before the timer overflows, servicing the timer interrupt will be delayed until serial_hw_int_cts has finished preparing the next byte, which can take quite some time. Then, depending on the order of the service routines which you don't have control over, the timer interrupt can be served immediately afterwards, or, some more service routiunes are called, control may even be given back to the main program to execute one machine instruction just to then go back to the list of interrupt service routines until finally servicing the timer interrupt.
That means, if there's more than one interrupt in use, servicing can have a jitter of indefinite amount, even to the point when interrupt events are skipped. Greets, Kiste Am Montag, 2. August 2021, 07:18:09 MESZ hat vsurducan <[email protected]> Folgendes geschrieben: Kiste, thanks for opening my eyes, PIC18F25k50 will do my job, it has indeed the ECCP, I didn't read correctly the notes 4 and 5 at pin descriptions. Thank you again. On Mon, Aug 2, 2021 at 8:36 AM vsurducan <[email protected]> wrote: > Hi Kiste, as far as I read my version of k50 (PIC18F25k50) does not have ECCP > it in 28 pin, I have to stick on my available stock of microcontrollers > during the inexistence at this point (Farnell, TME) of too many options to > buy immediately PIC microcontrollers. > Thanks for your solution, I think I will do it in interrupts using TMR0 for a > short timebase, count it for the needed frequency and toggle the output pins. > Yes, indeed a CLC would be helpful with the standard CCP... > best wishes, > > On Sun, Aug 1, 2021 at 5:48 PM 'Oliver Seitz' via jallib > <[email protected]> wrote: >> Hi! >> >> Well... almost all 28pin? Chips with suffixes like k20, k22, k50, k80, j11, >> j13, j50 and j80 do have ECCP, chips with suffixes like q40, q41, q43, q83, >> q84, k42, k83 and numerous more have CWG and/or CLC modules, which both >> allow the generation of those signals using a simple PWM. >> >> >> With the PIC18F2550, I only have one idea... Externally feed the pmw signal >> back to pins A0 and A1, set the CVRef module to somewhere in the middle, set >> comparator mode 0b110, and set one of the CxINV bits. Then you have the >> symmetric signals on C1out and C2out. It's not the most elegant solution, I >> admit... >> >> Greets, >> Kiste >> >> >> >> Am Sonntag, 1. August 2021, 14:58:43 MESZ hat vsurducan >> <[email protected]> Folgendes geschrieben: >> >> >> >> >> >> Thx Rob, the bridge mode (enhanced CCP) works only for a 40 pin device, I >> have a 28 pin device on my board. Enhanced CCP is available only on large >> size microcontroller. :( Almost all 28 pin microcontrollers suffer from >> this issue (PIC18F25k50, etc.) >> Since I need two signals with opposite phases, 50% duty cycle, whose >> frequency should be programmable between 1KHz and 2KHz I think they can be >> generated in compare mode...or perhaps in software. I also need to trigger >> an ADC read during the high level of those pulses from time to time. >> >> On Sun, Aug 1, 2021 at 2:17 PM Rob CJ <[email protected]> wrote: >>> >>> >>> Hi Vasile, >>> >>> >>> >>> >>> Not sure if I understood you correctly. If you want the PWM signals to be >>>exactly the same but only inverted you can use the bridge mode for one of >>>the PWM's that is when one output goes high the other goes low. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Kind regards, >>> >>> >>> >>> >>> Rob >>> >>> >>> >>> >>> >>> ________________________________ >>> Van: [email protected] <[email protected]> namens vsurducan >>> <[email protected]> >>> Verzonden: zondag 1 augustus 2021 10:14 >>> Aan: [email protected] <[email protected]> >>> Onderwerp: [jallib] PWM versus enhanced PWM, oposite polarity output? >>> >>> >>> >>> >>> >>> Hi all, >>> >>> PIC18F2550, 28pin PIC device has only the PWM implemented, the enhanced PWM >>> is available on 40/44pin devices only. However, If I want on a 28pin PIC >>> two PWMs running at the same frequency, with the same duty-cycle, how can I >>> generate one active high and one active low PWM signals without using any >>> external inverter? No deadband between the output signals is required. >>> >>> Any experience is appreciated. >>> >>> thank you! >>> >>> >>> >>> -- >>> 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 on the web visit >>> https://groups.google.com/d/msgid/jallib/CAM%2Bj4qvHSZrsUtoF_1GcDrNS2_mup_hc5ZbYOuQu4uGw5TYuAQ%40mail.gmail.com. >>> >>> >>> >>> >>> -- >>> 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 on the web visit >>> https://groups.google.com/d/msgid/jallib/AM0PR07MB624142E76C9FF412EBE22FC5E6EE9%40AM0PR07MB6241.eurprd07.prod.outlook.com. >>> >> >> >> -- >> 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 on the web visit >> https://groups.google.com/d/msgid/jallib/CAM%2Bj4qstLOMHMLtJcLLEfywQ_%2BTYOWzEUCkLtghwrskyk%3DO%3DAg%40mail.gmail.com. >> >> -- >> 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 on the web visit >> https://groups.google.com/d/msgid/jallib/592117056.1109097.1627829331026%40mail.yahoo.com. >> > -- 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 on the web visit https://groups.google.com/d/msgid/jallib/CAM%2Bj4qvV6WzGGmX3qBpyPbGszEk_n7Mc5onbMrtePRbxf2WJ0Q%40mail.gmail.com . -- 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 on the web visit https://groups.google.com/d/msgid/jallib/156178122.1042446.1627882658700%40mail.yahoo.com.
