was just trying to figure out if the board works at all ! once I compile it they all stop illuminating then when I disconnect the USB and plug it back in the buttons, LED 1 & 2 and also the pot all start working again until I try to compile it...
First of all, I apologize for the misinformation in my previous post. I had been using some older demo code. The current version from the link I gave is completely functional, consistent with all of the description on the web page. Sorry.
So, here's a fresh start:
- Unzip the zip file.
- Plug a USB cable from your PC into the micro-B connector on the PIC24F Curiosity board.
- Start MPLABX and open the project.
- Right-click the PIC24F_Curiosity_Board_Demo thing in the Projects window.
- It shows "Simulator" selected as the Hardware tool.
- Scroll down select the "PIC24F Curiosity" item under Microchip Kits (PKOB).
- Select your XC16 compiler version. I'm using version 1.40, but, as far as I know, any version will work. Select your version.
- Click OK
Now, click the "Make and Program Device" icon on the menu bar. Here's where some beginners (and some not-so-beginners) bog down. It may have to update the PKOB firmware, and I have found that the first attempt is likely to fail. Just try the "Make and Program Device" again. If it still fails, then you may have to do other steps like unplugging and plugging the USB cable and going through the Properties menu again. Different things work for different folks.
Anyhow, once it is programmed successfully, the RGB LED will be illuminated. As you vary the potenometer setting, the color changes from pretty Green to sort of Orange. At least that's my observation.
Press S1: LED1 goes on. Release S1 LED1 goes off.
Now when you vary the pot setting it goes the tri-color LED goes from Blue to Green. (Or at least, something other than the colors from the original load.)
Play around with setttings. By pressing S1 and/or S2 and varying the pot each time.
Now: Press the Reset button on the Curiosity board. Operation reverts to the condition that was in effect immediately after programming. Play around a few times more.
Unplug the USB cable and plug it in again. There will be a delay of a couple of seconds while the PKOB circuitry on the Curiosity board is initializing itself, then operation becomes the same as it was immediately after programming.
don't know why it's advertised for beginners
- If you use the Debug menu to program the device instead of "Make and Program Device" you will discover that it won't work unless you are actually debugging. That is, a reset or power cycle will not result in normal operation. People who have never used MPLABX might not realize that a Debug build puts additional code that makes "ordinary" operation (i.e. not using the debugger) not possible.
- My invitation to LOOK AT THE CODE might not be (probably won't be) be helpful to "beginners," since it there is a lot of stuff: Using a timer interrupt to process and debounce switch closures that change the state. Things like that. It can be an interesting demonstration of use of ADC and timers and interrupts, etc., and may be a useful learning experience and reference once they have got beyond the fundamentals, but not necessarily a good point for starting to learn about C and embedded programming in C and fundamentals of PIC24 programming in C.
- The part that is useful for "beginners" is that the hardware is set up with LEDs, Switches, a 32 kHz clock for secondary oscillator usage. There is a reset button and a programming interface that requires only a USB connection to your workstation; no external PICkit or other programmer is required, and no other power supply is required to get it up and running.
post edited by davekw7x - 2019/09/17 07:50:25