Author Topic: New PIC32MX360F512L - help!  (Read 4439 times)

0 Members and 1 Guest are viewing this topic.

Offline bldavisTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
New PIC32MX360F512L - help!
« on: September 03, 2008, 08:00:19 PM »
Okay so here is the deal I have started reading the Tech docs on this chip and I think that I should be able to Connect two of these to communicate with each other via serial connection. so the first question is; is that possible?

The next question is what PIC programer is going to be the best for me to learn about the this MCU? I have also ordered a development kit.

Is there anyone out there that has used this new 80Mhz MCU, that can provide a newbie a little guidance in the correct direction?
- Thanks to all for the assiatance  ;D
- Website under construction -
http://www.mysapce.com/davisbe98ta
check me out on face book!!!

Offline Iron Man

  • Full Member
  • ***
  • Posts: 74
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #1 on: September 04, 2008, 07:23:58 AM »
Yes you should be able to communicate between two of them. through either SPI or I2C, and suspect maybe even uart.

I don't quite understand what you mean by programmer. If you want an incircuit debugger i'd go with REAL ICE. It helps with stepping through functions, and it's not nearly as touchy as ICD2.

What do you need help with, as far as doing the 80mhz?

Offline bldavisTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #2 on: September 04, 2008, 01:10:56 PM »
We'll i new to pic's and i would like to build a circuit that will read and write to min or micro SD card that i can just slide in and out for different flight paths and for pulling data from the machine, this will be going into a UAV once the hardware had been designed and tested. so prior to flight test i will need a incircut debugger.
- Website under construction -
http://www.mysapce.com/davisbe98ta
check me out on face book!!!

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #3 on: September 04, 2008, 02:13:29 PM »
What's your most comfortable development language, or will this be a completely new experience all around?

I'm sure there would be plenty of help regardless of what language you choose.  This is a pretty adventurous dive into PIC programming but you ordered a development board so I assume you plan on trying out the basic functions to get a feel for it.  That's the most logical progression. 

 

     

Offline bldavisTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #4 on: September 04, 2008, 02:26:21 PM »
this will be a new experience all around. i have been learning c++ for another project and i think that i have a feel for it, i have writen code in C++ a few years ago and I currectly only do Java and a little .net - I have no problem understand what i want the device to do, but actually programing a PIC, that's all new to me. I do have the development board on order and it comes with MPLAB (any word on that) but i have to order the sensors this weekend so that i can start getting an idea on what the actual attitude of this creation will cause in teams of output on the control surfaces. i do understand that this is a huge first project but it's only the programming and electronics that are new to me. I have been building and flying r/c planes rockets and heli's for 10+ years so the physics of flight are not going to be an addition to my learning curve. I've given myself 6 months...think it can be done? what are your recommendations for a Newbie?  ???
- Website under construction -
http://www.mysapce.com/davisbe98ta
check me out on face book!!!

paulstreats

  • Guest
Re: New PIC32MX360F512L - help!
« Reply #5 on: September 04, 2008, 02:45:25 PM »
Hi,

 When it ships with MPLAB, this is a free version of their code editor and tool suite. You should also get a copy of microchipC32 (if not you can download it free at www.microchip.com). This is a free C compiler that microchip has produced to allow you to program the device easily, It should also come with some code samples to get you started. I think that you would be hard pressed to find something else that programs PIC32's at the minute with them being quite a new addition to the PIC family.

Have you got the development kit that includes the usb cable? If so then programming the device (as in transferring the program from your PC to the PIC) Is done using this cable through MPLAB.

 Youre likely to pick up C quite quickly especially with the included sample programs

Offline bldavisTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #6 on: September 04, 2008, 03:50:09 PM »
yes the starter kit does come with the usb cable. so if i understand you correctly i write and compile it in c, then import the program from microchipc32 to MPLAB and transfer it to the PIC. that sounds fairly straigh foward. I don't think that i will have too much trouble. Any other advise?

where would i go or who should i ask for assistance with developing an augmented controller for access to all the i/o pins, i also have 3 of the chips but there are not supporting electronics/comp. just the IC.

-- once again thanks to all
- Website under construction -
http://www.mysapce.com/davisbe98ta
check me out on face book!!!

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #7 on: September 04, 2008, 06:26:52 PM »
If you're going with C, you'll probably find a lot of good ideas and help.   The ASM source code library at the following link is huge, but the other language libraries are coming around:

http://piclist.org/techref/microchip/language/c/index.htm

I've found it to be a pretty helpful listgroup.  Under the Input/Output section there are a couple of servo test programs just to give you an idea or two.   

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
Re: New PIC32MX360F512L - help!
« Reply #8 on: September 04, 2008, 06:34:08 PM »
Do yourself a favor and use C . You can learn ASM for fun later on but it IS NOT a fun language. Trust me.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #9 on: September 04, 2008, 07:39:30 PM »
Code: [Select]
it IS NOT a fun language
aww come on!   :P  you mean you dont like to do mental gymnastics lol!   :D

seriously though, if you do find a reason to use asm sometime in the future I'll gladly volunteer to help ya, but airman's right... it kinda takes the fun out of it at first.     

paulstreats

  • Guest
Re: New PIC32MX360F512L - help!
« Reply #10 on: September 04, 2008, 08:09:14 PM »
Quote
yes the starter kit does come with the usb cable. so if i understand you correctly i write and compile it in c, then import the program from microchipc32 to MPLAB and transfer it to the PIC.

Among other things, MPLAB is a code editor. All you need to do is tell it to use the microchipC compiler. So you write your code and compile it in MPLAB then use MPLAB to transfer it to the actual PIC device. Its an entire tool suite in 1 package, It can run simulations etc.. to tell you what is happening in the PIC before you download it if you want to use it to its full capabilities.

 Definately use the free C compiler, as i said above you would be hard pressed to find any other high level programming compilers available at the minute, but you always have the choice of using assembly and for large or complicated programs Assembly = Headache.

 I would just advise getting MPLAB set up to use the M32 compiler first and then open the sample source codes to see how they work. You will understand a lot this way. Also the compilers always ship with standard libraries that make it easier to do math functions, analog conversions etc... Try to find documentation for those libraries and you will find that a lot of low level work has already been done, you just need to know how to implement them....

Offline bldavisTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #11 on: September 05, 2008, 12:00:45 PM »
I think that i should have posted this question here, sorry for the confusion, but here it is:

I do have side note or question for everyone on the board, Is there a simple (schimatic) way to mount the PIC32MX360F512L, with power regulation so that i can have access to all of the I/O pins? Microchip has the starter Kit (that i have ordered - i also have 3 single MCU's on the way 100pin TPFQ ), but there are only 3 leds and 3 switchs, I was thinking that i would be able to have access to all of the pins, but they say that i have to spend an additional 72 bucks (already spent 50 for the Starter kit) for the I/O board that will give me access. is this really required? i don't want to have to wait for this before i get to testing. any help guidance would be great, also will MPLAB simulate the code that i write? and is there somewhere that i can find this MCU in multisim 10.0.1 thanks again all.
- Website under construction -
http://www.mysapce.com/davisbe98ta
check me out on face book!!!

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: New PIC32MX360F512L - help!
« Reply #12 on: September 05, 2008, 06:12:17 PM »
This is partly why I mentioned starting with an earlier release microcontroller with enough functions to get you started (and still cover all the bases) that you could port.  They are easier to test with because if you get an 18 or 28 DIL configuration you can plug them directly into a breadboard for testing.  Thats just the beginning....  I took a look at your MCU's family datasheet to see if a good diagram might be in there but 646 pages later... yikes!  :o

I can actually believe it that you would need an expansion board for one of these 32 bit MCU's.  72 bones though.. ouch!     

As far as Multisim 10 goes, I only know of one PIC that is simulated.  The venerable 16F84A.  There is an MCU add-on for this from National's website.  You can write code and have it simulated using this PIC as a part.  It even simulates UART, A/D, etc... which this PIC does not provide as a built-in function.  Sorry I don't have any links - I'm mobile right now.


     

****Edit**** (I'm home now)

This is just a friendly suggestion for ya after thinking about this on my drive home.  Bear with me....   :D  I'm as long-winded as I am when I write! 

I would first gather all of the sensor information that you wish to collect and which parts need to communicate with each other and break them out into categories like measurement, feedback, etc...  Plus, I would draw it out in a nice block diagram.  <--This is one of the trademarks that sets programmers apart from efficient programmers. 

Then I would decide on some control devices like servo's and motors.

Next, I would pick out a few sensors and control devices from each category from different vendors. 

Next, I would decide on a communication protocol if required (this will be dependant on your sensors  that you choose) for example I2C, Serial, etc.. and pick the ones that were affordable and all communicated using the same protocol.

Finally, I would look at which MCU supported these features (with room to grow) and was easy to implement and cost-effective.  For example...no microsoldering.  I guarantee asm would seem like kids play compared to making a good connection on these 32 bit MCU pins if you went the direct connection route.     

After that.... I would start on the program flow, and in my experience it starts on paper. 

Start with plain english.  My work notebooks are full of written word about what I want an MCU to do.  "sensor A outputs a high and the MCU performs X"

Then, flowchart each sensor and motor.  Use yes or no decision points.  Arrows for loops, etc...   I can't say enough about how efficient you can make your code if you use flow charts.  It enables you to break each section down and sometimes the code almost jumps out into your face while your doing it.  Resist that temptation to use the first code snippet that forms in your head as the "one" that will work in this section.  Keep flow-charting!  As you flow-chart the rest of the algorithm you might just see the need for a more robust approach to an earlier operation or even a way to minimize the amount of code required by performing multiple operations at once.   

Begin writing the code. 

I know this sounds tedious, but trust me - it will make you completely aware of what is happening at each moment your code executes.  When a problem arises (and they will) you will know so much about that step that you should be able to overcome it with minimal mental strain. 

This was a snapshot of how I was taught to program and it has served me well over the years.  Good luck to you with your project and don't hesitate to pm me for anything!

Rob   
 








 
« Last Edit: September 05, 2008, 06:55:57 PM by RobD »

 


Get Your Ad Here

data_list