Hot answers tagged

3

Unless otherwise configured the timer will use the internal clock the rest of the PIC runs off of to increment. The timer will increment to its max value, although there are MCUs that are capable of incrementing to a particular value, or decrement to zero. I haven't used PICs too often but I think for at least the older ones if you to decrease the amount of ...


2

You simply need to AC-couple the pulse, which turns the circuit into a falling-edge detector, rather than a low-state detector. Here's the genreal idea, but component values may require tweaking for reliable operation. simulate this circuit – Schematic created using CircuitLab


2

TIM3 is on APB1 (see RCC_APB1RSTR). This means in your configuration the TIM3 clock is 72 MHz, since it's derived from PCLK1 x2.


2

Welcome to EE StackExchange. I'm not familiar with Keil tools, but a quick internet search yields this, so the answer is Yes. A practical approach would be to use an GPIO and an oscilloscope. Set the GPIO high when entering you function/task and low when exiting. Connect the scope probe to the GPIO and you can measure the execution time and frequency of ...


2

Dynamic drivers in Harmony ask for which peripheral you want to talk to as an argument. Static drivers have the hardware instance numbers hard coded so don't require an argument. Have a look for details here


1

It looks like I found a solution highly dependent on the device parameters. Low leakage parts are the critical factor. Take careful selection of Ids @ Vt and Vgs Two inversions are done: The 1st must have a gate threshold of << 1/3 to 1/2 of Vbat and not 2 to 4V. This is what causes decay on the 1st time constant. hi-side mechanical switch, low-...


1

I'm answering based on the MCC image you posted which relates to PIC16F and not your chosen PIC32MX which may be the source of your confusion. You should run MCC with your PIC of choice to fully understand what it is doing with your chosen PIC. The timer period is the time it takes for the timer interrupt to occur. MCC just works out hidden variables so ...


1

You're right on most of the points. PICs use typically any of the available clocks, usually the internal low frequency clock, internal or external (crystal) high frequency clocks, going through a prescaler for that particular timer, or an external pulsetrain, in which case it acts as a counter, since that pulsetrain doesn't need to be regular. There's ...


1

All PIC timers increment at each input clock cycle. Older PIC16 only have system clock as a timer input (plus an external pin) while newer ones usually have pre- and postscalers, multiple clock sources, etc. For you code to work in the same way you need the same input clock. Find out the exact timer clock on your PIC16 and make it the same on PIC32.


1

Frequency counters can get complicated quick depending on the bandwidth you want and the clock speed of the internal clock as well as the size of the registers holding the clock ticks and the input ticks. I mean it looks like it'll work but you should make sure that (1) the clock counter and the frequency counter are refreshed at the end of the sample (2) ...


1

Sort of... If you have the TRACESWO pin connected, you can stream limited realtime debug data to keil. One of the things it can include here is the time spent in each ISR. Also, it is most likely possible to measure performance of threads when using Keils own operating system RTX. If you own the ULINK Pro, and have the parallel ETM interface wired up, you ...


1

the problem was that my character array holding the data to send over UART was not large enough to hold the information i was trying to send. this line in the code-- char buff[64];//output UART buffer


Only top voted, non community-wiki answers of a minimum length are eligible