Microchips New Curiosity Board - A Review and Quickstart Guide - Page 1
Forum section: electronics / general

author: kolbep
author_rank: Frequent Contributor
timestamp: January 04, 2016, 06:11:00 pm
content: Hi Guys/Gals.I received a free RoadTest curiosity board from Element14 the other day.Here is my review and quickstart that I am sending them. Thought I would just make it public here as well......Curiosity Board by Microchip (Microchip.com/Curiosity), Distributed (and Provided for thisRoadtest) by Element14.What it is : A development/demo board with built in Pickit Programmer.This board is compatible with the Mplab Code Configurator by Microchip.For a long time many hobbyists/professionals have struggled with the configuration of thebuilt-in peripherals in Microchip PIC Products (Jumping Between Datasheets, Appnotes,Forums, Google Searches, etc, just to figure out that you forgot to set 1 little register for theperipheral).The Code Configurator is an easy click and fill in system that allows you to configure the PICand the peripherrals quickly and easily.By using the Code Configurator, most of the peripheral setup is done by the software, soyou can concentrate on the Non-Boring parts of your coding.The Curiosity system comes in a smart looking Red, Black and White Cardboard box.In the box you have the Curiosity Board itself (in a Static Dissipative Grey Packet),you also get some polystyrene packing peanuts (that have the same texture as cheese-puffs,but no flavour).Also included is a Warranty Registration Card, Important Information Sheet, and CuriosityInformation Sheet.A quick glance at the board shows that it is a decent build, with decent white silkscreen, ona red soldermask.The PIC Microcontroller is a 20 Pin Dip (PIC16F1619) in a socket, which makes it easy toswap out with another type, or to replace if you manage to destroy it somehow.There are Female Headers that allow you access to each pin of the Microcontroller.There is a Micro Bus Section of the board, a section for an optional bluetooth module, aswell as lots of other places for Input, Output, Etc.You will also find a capacitive mTouch button, Potentiometer for the ADC, 7 LED's orstatus/debugging/whatever you want.You also have a MCLR/Reset Pushbutton, and general purpose Pushbutton.This board has a builtin 5v/3.3v supply (selectable using a jumper) that gets its power via aUSB port on the underside of the board.The USB port also works to program and communicate with the board.Also under the board is another PIC Microcontroller to handle the USB interface andprogramming. It is basically a PICKIT on board!!! That already saves a lot of space and messon the desk. Normally you have your computer, USB Cable to Pickit Programmer, Cables andConverters for the Programmer, which then connects to your Dev Board/Breadboard. Nowyou just have the 1 Cable. How Neat.The baord also comes 4 standoffs (1 at each corner), and also 3 rubber feet. Dont knowwhy they have had this double system, because sometimes the feet are standing on thedesk, other times the standoffs...Anyway, lets plug this thing in, and see if it works.The PIC comes preprogrammed with a demo program, so that you can see it workingstraight away.So Plug in a Powerbank/Cellphone Charger or USB connection into the USB socket on theboard, and it comes to life.Straight away you get a Power LED, as well as the 3v3 LED coming to life. The 16F1619 canrun from 1.8v up to 5.5v, so you do not have to worry if you have set the jumper to thewrong place.Pressing S1 Lights D4.Pressing the mTouch section of the board causes D6 to lightTwiddle the Pot, and D7 changes brightness (using the ADC and PWM Peripherals)I let my 4 year old son test that part, he loved it (after I promised him that it will not shockhim)Now that it is working, you will probably want to play a bit with it (which is easy with theCode Configurator)So far there are lots of Videos on Youtube on how to use the Code Configurator, but thesteps to get started are simple:You need to have Mplab installed on your computer (with the Code Configurator Installed),as well as a C Compiler, so this is how you do it:Step 1:Go towww.microchip.com(The files you need to download are approx 700MB, so do notdownload them on a Metered Connection)If you are downloading in South Africa, then with a standard 2Mbps ADSL Line, you arelooking at over an hour to download these 2 files.Then under 'Design Support' you can download the Mplab X IDEThen under 'Design Support' you download the 'C Compiler' eg XC8Once the files are downloaded, Install MPLAB X IDE using the default settings.Once the MPLAB X IDE install has finished, Untick the 3 Check Boxes, and click FinishThen Run the XC8 Installer, again using the Default settings.Then open up the MPLAB X IDE Icon on your desktop (The Big Red X).Click 'File' 'New Project'Then click 'Next'From the Device List, Select (or type in) PIC16f1619, and click Next.We are not using a Debug Header, so just click Next.You will now be at the Tools Selection. Make sure your Curiosity Board is plugged in!From the Microchip Starter Kits Section, select Curiosity, and Click NextYou will then select the XC8 Compiler, and Click Next.Give your project a name, and Click FinishNow click 'Tools' and 'Plugins' at the top.Select the 'Available Plugins' Tab, and then tick the Checkbox next to MPLAB CodeConfigurator, and click INSTALL.Click Next, Accept the Terms (you are actually supposed to read them), and Click InstallAfter Installing, you will need to close off and reopen MPLAB X IDE.Now there is something Important you need to do for the Curiosity Boards built inProgrammer, you must set LVP mode.To Open the Code Configurator, click 'Tools' 'Embedded'.Click 'MPLAB Code Configurator', and you are good to go.First get rid of the Overlay that says what is where.Click 'System' on the top left.Then in the window on the right, Expand the 'CONFIG2' section, and check the LVP Enable section.Then lets do something with the LED's,so double click on GPIO on the left. It will then load the module to the top, under system.Double click on itThen on the right, click the padlocks in each column, This assigns the Pins to that ModuleThen in the center, tick all the pins to make them outputs, Then mark every one as 'Start High'Click the Program button at the top (Paper, then Arrow, Pointing to the Chip.), It will ask you if it must make a main.c file, let it do that, and once it has done a firmware upgrade to the programmer on the curiosity board, it will upload your program, and all 4 RED led's on your board should be on.That shows that the PIC, Onboard Programmer, and Computer are all talking fine...So time to search some of the Youtube Vids for the Curiosity Board by Microchip, and follow along, it is really that easy...

author: alsetalokin4017
author_rank: Super Contributor
timestamp: January 04, 2016, 09:00:17 pm
content: You can sprinkle some Lemon Pepper Seasoning on those packing peanuts, it makes them a lot more palatable.

author: Howardlong
author_rank: Super Contributor
timestamp: January 04, 2016, 09:30:50 pm
content: I am sure I'll be accused of being a Luddite, but I find auto-generated code such as that produced by the code configurator can actually complicate things rather than simplify them.In particular, I'm thinking of all those magic files that are generated, and pages of worthless commentary placed in your files.A blinky, for example, should always be little more than half a dozen lines, and be very clear.Where the MCC can help is in generating code for the config bits and setting up any configurable logic. However, whenever I've used MCC I ignore the files generated other than to copy and paste the contents into my own program.What I'm really glad to see is the vast increase in the number of devices now supported by MCC.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: January 05, 2016, 05:28:40 pm
content: I would add that a blinky should be done at the register level. What's the point of doing it by calling library functions?

author: MT
author_rank: Super Contributor
timestamp: January 05, 2016, 06:48:11 pm
content: Quote from: Sal Ammoniac on January 05, 2016, 05:28:40 pmAbstraction.... abstraction.....endless confusing muddying abstraction! It's the new religion!

author: Howardlong
author_rank: Super Contributor
timestamp: January 05, 2016, 07:18:40 pm
content: Quote from: Sal Ammoniac on January 05, 2016, 05:28:40 pmPrecisely!I had a look at the latest stable release of MCC last night. I did a blinky, and using their generated code to toggle the bit on a PIC24FV16KM202, it wasn't pretty what was generated by the compiler although the generated C code, to the uninitiated, looked nice and simple.I also used it to configure the MCCP for a half bridge with dead time, but fundamental parts were missing to make it work, most notably the polarity of the outputs to drive the MOSFETs. To my mind, having to hack the generated code makes a project difficult to maintain, and is a showstopper from using it as far as I'm concerned.My biggest problem with any code generator and abstraction is that if it's more, not less, that you have to learn. You still have to know what the config bits do and how the peripherals work, including any limitations.What I did find it useful for was quickly altering a peripheral's config in a unit test to see what the effect was without having to directly refer to the datasheet every time, but I can't see me using it in its current state for a real build.

author: Brutte
author_rank: Frequent Contributor
timestamp: January 06, 2016, 06:50:14 pm
content: Quote from: kolbep on January 04, 2016, 06:11:00 pmYou mean: a debugger. Any debugger can also program but programmers can not debug. They clearly advertise it as debugger:QuoteIs it like pickit2 (logic analyzer, pin drive, external tool for programming, etc) or more like pickit3? I can program any AVR8 and debug PIC32 with my Pickit2, is it the case with this on-board debugger?I have visited linked MC site and at least some of those uCs do not even support debugging.Nice trick, Mr. Head.QuotePIC8s have quite simple peripherals. DS are well written.QuoteIt is 10 euro for a 2k 8-bitter kit! Not sure if they are aware of who they are competing against.I think somebody from MC should visit Digikey or Farnell.QuoteNow that explains where the 10euro price tag comes from.Seems to me the only virtue you can gain with this miserable kit is patience.BTW, does a "hello world" compiled with their free XC in limp mode fit those 2k tinies?.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: January 07, 2016, 06:38:23 am
content: QuoteThey clearly advertise it as aprogrammer/debugger.QuoteIt's targeted toward 8 bit PICs, so we can forgive them for not supporting PIC32 (and even the Pickit2 doesn't officially support all of them). I don't think working with competitor's chips was part of the spec!QuoteLike the 12F1501 - an 8 pin chip with only 1k program words and 64 bytes of RAM, and itdoesn'thave dedicated debugging pins?I have never used a debugger. If I want to check out the program flow then I use the simulator. If the chip isn't doing what I expected and reviewing the source code doesn't reveal the bug then it needs a rewrite. Many applications use up all the pins on an 8 pin chip, and real time signals won't wait while you examine the machine state.I prefer to use the simulator because then I have complete control over all inputs while single-stepping through the code, and I don't have to hook up any hardware! I program in assembler though, so I don't have to debug the code just to find out what it's really doing...QuoteI bought a number of cheap dev boards from Farnell, and most have been disappointing - like the STM8 with ST-link that can't be upgraded, or the PSOC4200 with bootloader component that has to be included in every program or it bricks itself!If the Curiosity has a proper programmer/debugger that can be used with other 8 bit PICs then it's worth 10 euro (certainly better value than some other boards that only work with the one chip they came with). So maybe it can't do more powerful 16 and 32 bitters, but there's still a lot you can do with 8 bit PICs - and they are much easier for beginners to understand.QuoteI agree. Microchip's datasheets are easy to follow and their peripherals are logical and consistent. I like the block diagrams that show what the hardware does, and lists of registers with all bits associated with each peripheral. Some other manufacturers just give us generic datasheets and bloated frameworks that try to hide the details.