im new and confuzed.


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Default im new and confuzed.

    i have a 18f4520 and i didnt use it as i dunno how to use assembly, but then i heard about PICBASIC which allows me to use BASIC to program the PIC, right? ive used BASIC with my BasicStamp2, is this the same language with PICBASIC?

    i know someone with a copy they didnt use, so they gave it to me, it is version 2.6 PLUS. which if i have done my research correctly, should work with my PIC.

    so what do i do with the IDE and compiler etc? ive installed both PBP and Microstudio, so now do i just start BASIC programming in microstudio after loading the 18F4520.bas? then compile and program the PIC? do i jsut supply 5v and hook up the serial pins to my computer, or are their more steps to programming it?

    so basically what do i do to get my PIC ready to be programmed

    thanks

  2. #2
    Join Date
    Aug 2011
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: im new and confuzed.

    alright so i got my IDE all setup.

    so how do i program the PIC? their has to be a bootloader on it first for usb or serial programming to work with out a special programmer chip. If i supply 5v, add a cap on pin 18 and hook up the D+ and D- pins with USB to my computer i could use that to transfer but only with a bootloader. what is the method to use Serail (rs232) with a bootloader? do i jsut connect TX and RX via a serial cable?

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: im new and confuzed.

    One good way to program a PIC is to use an external programmer called a PICkit2 produced by Microchip. MELabs also makes a programmer module.

    One MAJOR difference between a raw PIC microcontroller and a Basic Stamp module is that you have to set up each of the pins you want to use as an input, output, analog input, pulse width modulated output, etc. using the PIC registers. You will find out about these registers by reading the associated data sheet for the PIC you are wanting to use. These registers and the capability to define what each pin will do also make the PIC MUCH, MUCH more powerful and capable than the Stamp. They (PIC microcontrollers) are also MUCH cheaper, say $2 instead of $49, than the Stamp.

    You might want to take a look at some of the example programs listed in the "projects" section on the home page of this forum (left side). Like > this < article (one I authored ) about communicating with "one-wire" temperature sensors. You can also see the PICkit2 programmer in the article.

    By studying others code examples you can see how they set up the various pins and registers on the PIC.

    These registers can be overwhelming at first... you MUST have the datasheet for the PIC available to reference the register names and bits in order to correctly configure them in your program.

    good luck and don't give up!
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  4. #4
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: im new and confuzed.

    Hi;

    I think you should follow the mister_e Beginners guide;

    http://www.picbasic.co.uk/forum/cont...r=56-Beginners
    Thanks and Regards;
    Gadelhas

  5. #5
    Join Date
    Aug 2011
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: im new and confuzed.

    Quote Originally Posted by gadelhas View Post
    Hi;

    I think you should follow the mister_e Beginners guide;

    http://www.picbasic.co.uk/forum/cont...r=56-Beginners
    i could help but notice you ended the lines of your sentences with ; like in C++ etc

    thanks for all the info!!

Members who have read this thread : 1

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