pic24 beginner


Closed Thread
Results 1 to 24 of 24

Thread: pic24 beginner

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    63

    Default pic24 beginner

    Hi,

    I'm very sorry to be putting a post that is way under the expectations of questions that seem to be posted on this forum, however i just need basic help with starting up. I've never programmed before, and someone referred me to using PIC BASIC pro (the pro version because for what i will be doing in the near future will require some of the extra functions).

    It's also quite likely that I will be using a pic24, i was going to buy the book "PIC Microcontroller Project Book : For PIC Basic and PIC Basic Pro Compliers" to help me get started and to learn. I was wondering if this was a good basis to learn on? And would it be helpful to learn to program the pic24 series of microcomputer? Also the probably dumbest question, when coding using the PIC BASIC pro is there any big differences for what pic you are specifically using and if so are there enough resources for the pic24?

    Sorry again for a boring post, but any help would be greatly appreciated!

    Regards

    Robert

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Welcome! Do not worry about boring post and such. We all started the same way. Well, maybe Melanie did not but...

    I do not think PBP supports the PIC24. http://www.melabs.com/products/pbp.htm
    what are you planning? I am sure there is one that will work.

    As far as learning to program. Personally I am against the books. Seems every one that has used a book still comes here with basic questions. So use the examples on MeLabs web site and read this forum. Ask all of the questions you want/need.

    The basic commands are the same for all of the chips PBP supports. Pretty much each PIC has it's own setup but many are close to the same. I am taking about the configs, analog and such.

    You will probably end up with a handfull of PICs that you use the most so you will become comfortable with those. Need a new PIC and have trouble with it? Ask.

    A couple of PICs that might be good to start with is the 16F877A and the 18F4550. Between the two you should be able to do most anything.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2009
    Posts
    63


    Did you find this post helpful? Yes | No

    Default

    mack

    I just realised whilst browsing the forums that it didnt support 16bit. but thats ok i have changed my idea on how to complete what i want, so i only need a chip that provides 10bit ADC.

    Ill explain my whole project! basically im working for a wind turbine company, and currently the power from the turbine goes to an analogue rectifier and then into a converter which goes off to the mains. Unfortuantely this has caused alot of noise due to some problems, and also means we can't collect data too easily or send error signals etc. so im using a microprocessor that is programmed to do what i want. First ill explain what i want and then il explain how i think i will do it

    i want to measure the frequency of 3 analogue signals and get the average from them, and then using that i can create a time constant for each average, which will determine the pulse width modulation of the digital signal output. additionally i want to be able to measure the DC voltage after its been modulated, so that it can switch the generator off if the voltage gets to a certain point (since this will cause damage to the resistor inbetween the + and - and then will cause further damage etc)


    First of all i've decided that I am going to run the 3 analogue signals (3 phases from the turbine) through a schmitt trigger (unless there is a schmitt trigger already integrated into a specific pic). Using the now digital signal i can easily measure the drops using an interrupt? with the information from the drops i can measure the frequency? and then using the frequencies from all 3 signals i can get an average (f1+f2+f3)/3 and i can use that to set the time constant for the pulse width modulator.

    im sorry if some of that was completely impossible, but i havnt worked with programming or electronics at all before.

    thanks

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Interesting project.
    I would look at the 18F4550 for this and clock it at 48Mhz.

    Also a coulpe of threads that may help
    http://www.picbasic.co.uk/forum/showthread.php?t=3251
    http://www.picbasic.co.uk/forum/showthread.php?t=11571

    What do you have in mind for a programmer? The PICKIT2 from microchip is nice...and cheap.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2009
    Posts
    63


    Did you find this post helpful? Yes | No

    Default

    well thats the problem i wasnt too sure on how this works since its my first time, so would i program everything on (in this case) pickit2, and then then how would i compile it? or does that program include that? would that mean not having to purchase picbasic or picbasic pro? just need a run through on the whole process

    thanks, sorry again was the mindless questions, just can't seem to find this ridiculously simple stuff other places

    edit: sorry i think i confused myself massively when i wrote that, so it doesnt make much sense, would it be ok for someone to give me a quick run through on how i would do this, e.g. create program on what, upload program to pic how, etc
    Last edited by robertpeach; - 11th August 2009 at 16:01.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    PicBasic compiles the basic code into assembly language.
    If you are using an 18F chip MPASM then converts the assembly into HEX.
    This is all done automatically when you compile your basic code. MPASM is free, it is part of MPLAB. When you purchase PBP a compatibe version of MPASM come with it.

    Now you need a way to "squirt" the hex into the PIC. That is where the PicKit2 comes into play. There are other programmers out there. If you do not go with the PicKit2 MeLabs has some good ones. Beware of the clones though. Nothing but trouble. The last I flecked the PicKit2 war around $50 US.

    So it boils down to needind PBP and a PicKit2 and a bread board or two and you should be good go.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. Replies: 0
    Last Post: - 29th August 2008, 05:54
  3. Beginner at PB
    By alphahr in forum Off Topic
    Replies: 1
    Last Post: - 21st April 2008, 17:43
  4. Beginner trying to use arrays
    By captain in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd November 2007, 07:20
  5. Pic ID Error please help (beginner)
    By ninja in forum General
    Replies: 4
    Last Post: - 11th August 2005, 17:54

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts