You could also try internal oscillator.

Matt.

On Tuesday, May 17, 2022 at 5:17:06 PM UTC-4 [email protected] wrote:

> Hi Kiste,
>
> Thank you very much.
> That solved the baudrate issue.
>
> But serial_hardware still don't work as it should.
> Still have Frame and Break error on PC side.
>
> Now, your code;
> forever loop
>    serial_hw_data=0x22
>    serial_hw_data=0x22
>    delay_1s(1)
> end loop
>
> Results;
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
> b7 37 00                                         ·7.             
>
> Cannot understand what's going on.
> Anymore ideas?
>
> Cheers,
> Filipe Santos.
> On Tuesday, May 17, 2022 at 8:34:17 PM UTC+1 Kiste wrote:
>
>> So, here it is:
>>
>> pragma target clock 20_000_000                   -- oscillator frequency
>> pragma target RSTOSC   HFINT32                   -- power-up clock 
>> select: OSC
>>
>> You're telling the compiler, the PIC would run at 20MHz, and you're 
>> setting the PIC to 32MHz. 
>>
>> Make it
>>
>> pragma target clock 32_000_000                   -- oscillator frequency
>>
>> and your baudrate will be as specified.
>>
>> Greets,
>> Kiste 
>>
>> Am Dienstag, 17. Mai 2022, 21:12:10 MESZ hat flyway38 <[email protected]> 
>> Folgendes geschrieben: 
>>
>>
>> Hi again Kiste,
>>
>> Here my code pragmas;
>>
>> -- Pragmas/ configuration memory settings (fuses)
>> pragma target clock 20_000_000                   -- oscillator frequency
>> pragma target OSC      OFF                       -- HS crystal or 
>> resonator
>> pragma target RSTOSC   HFINT32                   -- power-up clock 
>> select: OSC
>> pragma target CLKOUTEN DISABLED                  -- no clock output
>> pragma target WDT      DISABLED                  -- watchdog
>> pragma target DEBUG    DISABLED                  -- no debugging
>> pragma target BROWNOUT DISABLED                  -- no brownout reset
>> pragma target FCMEN    DISABLED                  -- no clock monitoring
>> pragma target CSWEN    ENABLED                   -- allow writing OSCCON1 
>> NOSC and NDIV
>> pragma target LVP      DISABLED                  -- no low voltage 
>> programming
>> pragma target MCLR     EXTERNAL                  -- external reset
>> -- The configuration bit settings above are only a selection, sufficient
>> -- for this program. Other programs may need more or different settings.
>> --
>> WDTCON_SWDTEN = OFF                              -- disable watchdog
>> --
>> _usec_delay (100_000)                            -- wait for power to 
>> stablilize
>> --
>> enable_digital_io()                              -- make all pins digital 
>> I/O
>>
>> Cheers
>> Filipe Santos.
>> On Tuesday, May 17, 2022 at 7:05:54 PM UTC+1 Kiste wrote:
>>
>> Hi Filipe,
>>
>>
>> I suspect the baudrate problem in settings like
>>
>> pragma target clock  ?
>> pragma target OSC ?
>> pragma target RSTOSC ?
>>
>> OSCCON* = ?
>>
>> What are these settings?
>>
>> Greets,
>> Kiste
>>
>> -- 
>> 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/6e0906ee-c9ec-4f45-94fb-3f99356d83aen%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jallib/6e0906ee-c9ec-4f45-94fb-3f99356d83aen%40googlegroups.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 on the web visit 
https://groups.google.com/d/msgid/jallib/55950054-a140-443d-b368-c2e9abf6816bn%40googlegroups.com.

Reply via email to