Search found 250 matches
- Thu Dec 11, 2025 12:14 pm
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
Re: C Based Delay - with and Without Timers
Yeah, I'm definatly staying within standard FC as much as I can. I'm an engineer, certainly no coder! Sadly the single Hardware UART is being used to drive a LIN output. J.
- Thu Dec 11, 2025 10:33 am
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
Re: C Based Delay - with and Without Timers
Well, I still can't get any Software driven UART type to send out anything with the correct Bit timing for 19200 or above. I would have though a PIC running at 32MHz should have been able to do that? Running in HS PLL mode is painful since I'm not sure if the FC internal delays/timers/calculations k...
- Thu Dec 11, 2025 9:53 am
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
Re: C Based Delay - with and Without Timers
I'm going down this rabbit hole a bit further to improve my understanding and I 'think' I'm getting there! This needs two instuction cycles, which may explain the larger value I got previously. LATC6 = 1; NOP(); LATC6 = 0; I think this is closer to a single instruction delay and is my TRUE minimum p...
- Thu Dec 11, 2025 9:11 am
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
Re: C Based Delay - with and Without Timers
Hi, Thanks Martin, Leigh, As you both stated the method used signiicantly effects the duration of very short pulses. A) toggling single bit of Port C, using the FC output command and delay using a single NOP(); in a C code box. Result a Pulse of : 998nS B) toggling a bit using "LATC6" and ...
- Wed Dec 10, 2025 8:34 pm
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
Re: C Based Delay - with and Without Timers
Thanks Steve, I got 1uS (998ns) on a single "NOP();" so there is potentially something funky going on. J.
- Wed Dec 10, 2025 5:53 pm
- Forum: General
- Topic: C Based Delay - with and Without Timers
- Replies: 10
- Views: 345
C Based Delay - with and Without Timers
Hi, Side task whilst debugging my test rig. :) How can I create a micro second delay in C code. I wish to avoid the FC Delay function, to exclude that from my investigation. A) One method that uses the PIC timer. B) Second method that avoid the using Timers. Maybe a known loop count of 100 or simila...
- Wed Dec 10, 2025 4:16 pm
- Forum: Bug Reports
- Topic: FC11 Software UART Bit Timing?
- Replies: 2
- Views: 154
Re: FC11 Software UART Bit Timing?
Hi Ben, Please move this to another Forum section if its no longer a bug issue. thanks, J. FOsc 20MHz, HS Mode. No PLL. I'm 95% sure clock is correct as this also clocks the hardware UART with No issues. I measure these values on the scope when using the Hardware UART. All of these Work Great and ar...
- Wed Dec 10, 2025 3:24 pm
- Forum: General
- Topic: UART Baud and Bit rate Measurement With a scope.
- Replies: 3
- Views: 120
Re: UART Baud and Bit rate Measurement With a scope.
Thanks for the clarification Leigh! exactly what I needed.
Fair Point regarding the question, everything is down to interpretation.
I asked "when measuring UART baud rate with an oscilloscope do you measure the period or pulse width"
hey ho.
J.
Fair Point regarding the question, everything is down to interpretation.
I asked "when measuring UART baud rate with an oscilloscope do you measure the period or pulse width"
hey ho.
- Wed Dec 10, 2025 2:25 pm
- Forum: General
- Topic: UART Baud and Bit rate Measurement With a scope.
- Replies: 3
- Views: 120
UART Baud and Bit rate Measurement With a scope.
HI, I'm battling UART and my trusted method to check Baud is to measure the width of a bit using a scope. When sending 0x55, I have always used the Cursors to measure a single high or low pulse width. I'm getting some subtle timing errors so I thought I would check my basic method with google, then ...
- Tue Dec 09, 2025 4:03 pm
- Forum: Bug Reports
- Topic: FC11 Software UART Bit Timing?
- Replies: 2
- Views: 154
FC11 Software UART Bit Timing?
Hi, PIC18F2585 20MHz Xtal. Running latest updates. Issues with UART, OK in hardware mode but will not run anything above 9600 in software mode. I usually can run 19200 without issues. Bit timing looks wrong. getting around 22Khz for a 19600 setting. I checked a LED flash at 10hz on scope, good. but ...