We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

10

The term "Arduino compatible" basically means nothing. Many sellers use the term more as marketing ("You can make this work with your Arduino!") than anything else. The Arduino is (usually) just an ATMega microcontroller on a board, that ATMega is very similar to many other microcontrollers. Nearly all of them work with a supply between 2 V and 5 V as does ...


4

If you follow the instructions in the PICkit 4 Getting Started Guide you will find this picture that shows the need to provide a pullup resistor on the MCLR pin of the MCU on your PC board or breadboard. Here is where you can find the document: https://www.microchip.com/developmenttools/ProductDetails/PG164140 Note I posted this answer primarily to provide ...


4

You are using a baseline PIC, so you can refer to the XC8 compiler User's Guide section 5.3.10: 5.3.10 Baseline PIC MCU Special Instructions The Baseline devices have some registers which are not in the normal SFR space and cannot be accessed using an ordinary file instruction. These are the OPTION and TRIS registers. Both registers are write-only ...


3

The PIC16F57 has no interrupts so everything must be done by polling. The trick with polling is to do it in a way that doesn't block other operations. Instead of waiting for 3 seconds after detecting the switch closure, wait for a much shorter time eg. 30ms, increment a counter, then check the switch again. If the switch is now open then reset the counter ...


2

It will be certainly compatible with any microcontroller. The keyword "Arduino compatible" generally means that some of the following are true (from most to least likely): Module likely uses 5V signaling, or is at least 5V tolerant It likely interfaces using one of the hardware interfaces available on Arduino (serial, I2C, or SPI) There may be an Arduino ...


2

When it say it is compatible with something you know that it will work with specific platform (if seller doesn't lie). To check if it will work with your specific platform you can check if specification are compatible with your platform. For modules you usually check power supply range, interface type and interface voltage. In your specific case these are: ...


2

Confirming the task was actually being created by using the pdPASS was a great tool, from there, the answer was found in the FreeRTOS Reference Manual, under the vTaskCreate example. Problem was solved by changing configTOTAL_HEAP_SIZE from 512 to 1024, in the FreeRTOSconfig.h (for the PIC18f452) /* Define a structure called xStruct and a variable of ...


1

Overflow in this case means a match to the preset register, which causes the timer to reset. It's spelled out better in the description of the timer that the PWM module is based on than in the description of the PWM operation itself. 14.2 Timer2 Interrupt Timer2 can also generate an optional device interrupt. The Timer2 output signal (TMR2-to-PR2 ...


1

Ok, the problem was in another static _DummyHandler function. This is stupid, but i missed, that program counter jump in another module, and this module has an error with handler assignment, so it always dummy. Be careful with identical local names. =)


1

I'm going to suggest an entirely different thought to consider which addresses itself to both the measurement for the purposes of on/off thresholds, as well as detecting both shorted and open cases for the LDR (broken or someone has a screwdriver shorting the contacts for some reason.) The idea works almost entirely independently from the specific LDR ...


1

I want to add a simple LED indicator that will turn ON when the LDR is broken or something Actually driving the LED indicator is the easy part, of course. Depending on the expected light output from the "LDR fault detected" LED, then a drive transistor might not be needed. For detecting that the LDR is "broken or something", you need to decide exactly what ...


1

Try putting a space between the "TRIS" and the "GPIO" when declaring it. TRIS is an instruction that expects a register name (address) as its argument. GPIO is a valid register name for small (8-pin PICs). [Edit} I've just re-read the question. I'm not competent in C but I can tell you what the instruction is supposed to look like in assembler: movlw ...


1

Just for the heck of it, I wired up a PIC on a breadboard to an ICD4 and compiled that code. I had to change a few lines and remove 3 #pragma statements because I didn't have a 16F88 in DIP (but did have a 16F819, which is fairly close). Worked fine. Here's the exact code: #pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTRC oscillator; ...


1

The MCLR shouldn't be left floating. If it is the PIC may be in reset. MCLR should be pulled to Vcc to keep the pic out of reset. Maybe the programmer, if attached will hold MCLR high. If it doesn't, put a diode between Vcc and MCLR (cathode to MCLR). The diode will pull MCLR up to near Vcc but becomes reverse biased when the programmer applies the ...


1

I was facing a similar issue with a PIC32MX and my solution was to use the configuration as in the image below for the USART driver. Then, I've enabled the 'Use Console System Service?', under 'Harmony Framework Configuration > System Services > Console', using the configurations listed in the image below. Hopefully, these configurations may be applicable ...


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