Tag Info

3

Multitasking? Yes or no, depending on how you define it. In the truest spirit of multiprocessing: No. A small single-core MCU only executes a single instruction at any given instant. In the spirit of the 90's multitasking: (when almost all PCs had only a single CPU, but you still had OSes with multitasking): Yes. You can emulate it, by switching very ...

3

Why do you think it is not possible? Functions can be called and not using functions leads to undecipherable spaghetti code. There are both professional quality designs but also beginner hobbyist code so you can find both. Some extremely tiny microcontrollers can have a limited hardware stack so subroutines are not used much, even if it is possible.

2

To put it simply, Yes. There may be some conceptual issues with your understanding now. Or maybe your language used to describe your problem. I will attempt to answer anyway. The "main" function is the one being executed by the micro's main execution core. Everything that is executed normally will be called from the main function. The main function can ...

2

If you're looking for the power required you missed it. Solenoid coil specifications from page 2 of the datasheet. (Click for high-resolution.) The worst case is 15 W on the DC versions so allow for $I = \frac P V = \frac {24}{15} \ \text A$. Go for a MOSFET that is rated at > 1 A and can be turned fully on by a logic-level output from your PIC32 - 3....

1

Take a look at the link your provided for the PIM module. The "Pin Mapping" section explain this: There are several device pins that don’t have a one-to-one connection to the ICE connector. Some are hard-wired to a certain location, while others are mapped to the connector through jumpers. In the Table 1, you can see thant the SOSCI and SOSCO pins ...

1

Would you recommend programming the PIC32 on an external board? Or build the whole thing on one PCB? Putting them on the same board makes the construction simpler and cleaner, but putting the MCU on a separate board could make it easier to program. For prototypes I sometimes mount the MCU on an SMD to DIP converter (possibly with crystal and other ...

1

You would represent your numbers using 2's complement, which is what is built in to the microcontroller. For an 8 bit 2's complement value, the range is -128 to 127. The PIC 16F instruction set documentation provides all the information you need to write the assembler code (this smells like a homework problem with no work attempted so you get a partial ...

1

My question is, if you can make a call to a function that is outside the main and is running a scheduled task. First and foremost, it is impossible to concurrently execute multiple threads of execution on an 8-bit microcontroller that has a single core. At any given time only one thread of execution can be running on the microcontroller's one core. ...

1

The labeling of the pins can be quite hard to understand if one is not familiar with the abbreviations and feature MCU (can) have. The actual "work" the pin does depends on how you set certain registers or maybe even fuses. Just for starters you dont have to worry about them too much. As you continue through the datasheet and explore the features you will ...

1

It's pretty typical in microcontrollers today that each pin has more than one function it can be configured to implement. I'm not familiar with Microchip's scheme, but they'll have designed it so that the chip has some basic functionality coming out of reset -- then it's your job to write the software so that a given pin does what you want it to. There's ...

1

The PIM (MA240023) included with the Explorer-16/32 (DM240001-3) connects pins 73 & 74 of the PIC24FL1024GB610 controller to a 32.768KHz crystal located on the PIM. These signals are not connected to the Explorer-16/32 circuitry. To connect them to the Explorer-16/32 circuitry remove C11, C6 and X1 from the PIM and add wires from the upper pad of X1 to ...

1

The pin RC14 is an analog input by default so just add: ANSCbits.ANSC14 = 0; to switch it to digital.

1

I was researching this same problem I was having with a PIC ADC and came across this old thread. It led me to try something different to what is discussed here and voila it worked. So I guess an update to this old thread is in order. I tried changing the TRIS register as discussed here but with mixed results on a PIC12F1840 - it solves the minimum reading ...

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