Author Topic: PIC32MX Quickstart - A Tutorial for Hobbyists  (Read 79308 times)

0 Members and 2 Guests are viewing this topic.

Offline HopWorks

  • Contributor
  • Posts: 10
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #25 on: October 02, 2012, 09:54:07 pm »
PIC32MX Quickstart

Part 4 - Peripheral Pin Select (PPS)
...
PPSInput() and PPSOutput()

The arguments are in the order we read them from the tables so to set U2TX we say:
PPSOutput(4, RPB10, U2TX);

And to to set U2RX we say:
PPSInput (2, U2RX, RPB11);

If I may ask, what is the first parameter for? I looked at the pps.h header file in C32 and the parameter name is 'grp'. Why is it 4 for PPSOutput and 2 for PPSInput? Are those values static?

Also, when I looked at the comments in the pps.h file, they do not even acknowledge the grp parameter. Yet the #define below the comments clearly shows it.

Thank you very very much for your posts! Very well written and very helpful!
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: us
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #26 on: October 11, 2012, 01:03:59 pm »
I wish I read your articles before I started programming the PIC32...

That is so true. These tutorials would have been a big help for those days I was pulling out my hair.  Part of the problem is microchip data sheets for the pic32. They write one datasheet to cover 10 chips and then pick and choose what applies to each chip in the data sheet. That makes it much harder to understand than one datasheet for each chip.  Some of the include files don't make it easier either, when you open one and it is filled with a bunch of if then branches for different models it really confuses things.
 

jucole

  • Guest
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #27 on: October 27, 2012, 11:27:42 am »
Great post Chris!!
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #28 on: October 28, 2012, 05:30:42 pm »
Nice post! It almost makes me consider retrying Microchip parts.
 

Offline simonvav

  • Newbie
  • Posts: 2
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #29 on: August 22, 2013, 03:02:04 am »
PIC32MX250F128B is one of the best micro controllers for beginners. If you need a tutorial and plenty of samples, just type "PC USB Projects" into Google.
 

Offline caroperTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #30 on: August 22, 2013, 06:38:42 am »
I moved the Tutorials over to http://caroper.blogspot.com/2013/06/this-will-be-home-for-my-pic32mx.html and developed he hardware in this thread into a USB based ChipKIT compatible system on a bread Board. Very useful for beginners to 32Bit systems as it eliminates the need for MPLab and includes a fully optimised C++ compiler for free.


I have not had a chance to update it this month as I was away on business, but have several more experiments ready to be written up, so if you like what you see, subscribe so you get notified.


Cheers
Chris


Offline M0BSW

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
  • Left this site 2013, they will not delete it ????
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #31 on: August 25, 2013, 09:08:55 am »
 This is fascinating as I only recently have dipped my toe into pic programing, I think this is out of my league a lot, but still going to follow this thread as it's current with my endeavours at this time.
 And here's a fair warning , I am more than likely going to ask some stupid questions, if  no when I get lost :-//
no one would or will tell me how to delete this account
 

Offline caroperTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #32 on: August 25, 2013, 09:28:05 am »
This is fascinating as I only recently have dipped my toe into pic programing, I think this is out of my league a lot, but still going to follow this thread as it's current with my endeavours at this time.

On the contrary the 32Bit PIC's are actually easer for beginners than the smaller ones, as they are optimised to High Level Programming languages and don't have segmented memory. The main reason I created the board design, linked above, is that it allows you to use an Arduino Style language and has predefined Libraries so that you can dive straight in to exploring capability without having to learn the low level hardware first.

Quote
And here's a fair warning , I am more than likely going to ask some stupid questions, if  no when I get lost :-//

When you are trying to learn something new, the only stupid question is the one you didn't ask, especially as getting stuck on something simple may well make you give up.

Cheers
Chris

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13742
  • Country: gb
    • Mike's Electric Stuff
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #33 on: August 25, 2013, 09:46:07 am »
I've used this chip a couple of times - quite nice and good value but IMO they've trimmed a little too much from the larger parts :
No shadow registers for interrupt context save severely worstens interrupt latency  & context save/restore time from what it could be.
No pullups in I/Os - WTF?
Only limited pin-remapping capability
Incomplete UART FIFO implementation - no timeout interrupt means you need to waste a timer for an interrupt to catch small leftovers stuck in the FIFO.
Although the UART supports high rates, but looks like they just assumed you'd be using DMA to run it, but this is not always practical, and the interrupt latency means rates over about 3mbits/sec are difficult to achieve in practice if you need to do any realtime processing of incoming data (e.g. address matching).

It's still pretty nice though, just annoying when little details spoil things.
The wide range of packages  is great - I've used both QFN28 and SO28, and DIP for prototyping. The QFN28 is about the smallest non-BGA part I could find with 32K RAM, and Microchip's cheap programming service can be enough on its own to
justify choosing it over an ARM.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline M0BSW

  • Frequent Contributor
  • **
  • Posts: 673
  • Country: 00
  • Left this site 2013, they will not delete it ????
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #34 on: August 25, 2013, 09:48:51 am »
This is fascinating as I only recently have dipped my toe into pic programing, I think this is out of my league a lot, but still going to follow this thread as it's current with my endeavours at this time.

On the contrary the 32Bit PIC's are actually easer for beginners than the smaller ones, as they are optimised to High Level Programming languages and don't have segmented memory. The main reason I created the board design, linked above, is that it allows you to use an Arduino Style language and has predefined Libraries so that you can dive straight in to exploring capability without having to learn the low level hardware first.

Quote
And here's a fair warning , I am more than likely going to ask some stupid questions, if  no when I get lost :-//

When you are trying to learn something new, the only stupid question is the one you didn't ask, especially as getting stuck on something simple may well make you give up.

Cheers
Chris
Ok I've taken that on board Thank You
no one would or will tell me how to delete this account
 

Offline GertJL

  • Newbie
  • Posts: 1
  • Country: za
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #35 on: August 17, 2015, 10:57:39 am »

Hi Chris,
 (not sure if this blog is still alive,  btw I am also from South Africa)

Thanks for the interesting and clear explainations on topics

I have a query, I am sure it is straight-fwd....

First, I observe , 'Change Notification' refr in the datasheets.
What is the purpose thereoff and is it applicable in
Part 4 - Peripheral Pin Select (PPS) ?

I have ChipKit DP32, populated with 32MX250F128B -
I am using PicKit 3 to prgm the unit.
Using MLABX 1.85 xc32 compiler.  MLA Lib : 2013/06/15

I have the basic I/O working etc.

I now wish to implement INT2 on PA4 (chip pin12)
So with your info -
<<
PPSUnLock;
 PPSInput(3,INT2,RPA4);
PPSLock;
  PORTSetPinsDigitalIn(PORTA,BIT_4);
>>

I believe I now have PORTA.4 (RPA4) Configure for INT2, digital Input
 Please advise if this is incorrect?

Now, how do I implement prototype config / ISR Handler for INT2?
I want it configured for Edge-trig,
Not sure how to configure it etc.

Lastly, do you have some examples re ADC configs and Applications
(Auto Sampling)

Can you advise please?

Once again, thank you for interesting reading, which allows for me
to progress.

Regards,
Gerhard





















 

Offline caroperTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: PIC32MX Quickstart - A Tutorial for Hobbyists
« Reply #36 on: August 18, 2015, 01:04:10 pm »

Hi Gerhard,


Or as a fellow South African maybe I should say "Howzit Boet", and dankie for you kind comments


The Blog is not dead as such, more dormant as I have had not time to work on it in the past year.
That said I have just updated it with the introduction to a new series of  articles about a flexible development board.


I can't really answer your questions off hand, as I don't use MPLabX or XC32 myself, I tend to use the ChipKit as an Arduino Compatible tool for rapid prototyping and my colleague then writes the native PIC32 code, he is the Software Guru. I am more of a hardware guy so if what I need is not in a Library I get him to create a library for me.


The Blog tends to document my current experiments, originally for my own records but I decided why not share.


My current focus is on the Small pin Count 8 Bit devices as I am busy developing a proof of concept for a client, so any Blog posts in the near future will probably be PIC18 related as I get to grips with that architecture and its peripherals.


One day I am sure I will get back to the series on understanding PIC32's and I still want to create a ChipKIT bootloader for the PIC32MX170, but I have no idea when.


Cheers
Chris

« Last Edit: August 18, 2015, 01:07:09 pm by caroper »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf