MC Studio and 18F252


Closed Thread
Results 1 to 8 of 8
  1. #1
    trust issues's Avatar
    trust issues Guest

    Default MC Studio and 18F252

    Hi all, I'm trying to program a PIC 18F252 using MicroCode studio. I am new to PIC's in general but what I need help with in particular is naming the pins. How in the code do I refer to a particular pin? Like how would I get the code to scan to see if RA0 is high or low? or to output a high logic signal from RA1?
    thanks in advance.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Hi all, I'm trying to program a PIC 18F252 using MicroCode studio. I am new to PIC's in general but what I need help with in particular is naming the pins. How in the code do I refer to a particular pin? Like how would I get the code to scan to see if RA0 is high or low? or to output a high logic signal from RA1?
    thanks in advance.
    If you want to test status of a pin:

    HighOrLow VAR BIT

    HighOrLow=PORTA.0


    The result is in the HighOrLow Variable

    To send high level to RA1 use
    PORTA.1=1
    or
    HIGH PORTA.1

    To send low level
    PORTA.1=0
    or
    LOW PORTA.1
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Trust Issues,

    TI>>Hi all, I'm trying to program a PIC 18F252 using MicroCode studio. I am new to PIC's in general but what I need help with in particular is naming the pins.<<


    Forgive me if I am wrong, or incorrect to make a quick guess here, but MicoCode Studio will not program your chip. I believe you still need Pic Basic Pro for your compiling and MPASM or other assembler loading program for your chip. MicoCode Studio is a "Shell" for PBP and your loader. Powerful shell at that.

    the way I read your message, you are fairly new to PICS, and I didnt want you to think that MicroCode Studio was all you needed.

    If I am incorrect on the above, will someone please set me straight? (I do not use MicroCode Studio) I have downloaded the "Lite" version, but gave up on it... It didn't support my chips... and I didn't want to spend more money on this shell.

    Dwayne

    example of simple pin checks and controls.

    Pin1 Var GPIO.1
    Pin2 Var GPIO.2

    if Pin1=High then Pin1=Low
    if Pin2=1 then Pin2=0
    end
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  4. #4
    trust issues's Avatar
    trust issues Guest


    Did you find this post helpful? Yes | No

    Default

    I think It's ok for me to program in MicroCode Studio, in the top left corner theres the drop down menu "Target Processor" and it has my 18F252 in it. Does this mean anything or will I have to use another program?

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Bad guess Dwayne... Microcode studio will support every PICs on the market. If he's not in the list, you can it if you edit the pic.ini file in the MCS directory. Maybe you use an older version.

    If you want to compile with PIC18F serie, you must set MPASM as assembler in the View > PicBasicOption >assembler tab. In case MPASM is not set, PM will be used for. As is seems PM is not support 18F serie for now. This is why Dwayne.

    Don't be affraid of MicroCode Studio. This is the best i know on the market... better than the shi... MPLAB. But again, it's my own opinion here.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Steve,

    Steve>>Bad guess Dwayne... Microcode studio will support every PICs on the market. If he's not in the list, you can it if you edit the pic.ini file in the MCS directory. Maybe you use an older version.<<


    Then are you saying that the MicroCode Studio, you no longer need PBP to program your chip? I was under the impression that you had to have PBP *and* MicroCode Studio. Thus I bought PBP, because it was cheaper and had all my chips on it.


    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Dwayne,
    MicroCode Studio is a simple code,text editor + few powerfull utility. In fact you must have PBP + MPASM (if you use 18F series) to compile your code within MicroCode Studio.

    MicroCode studio offer a bootloader for few PIC too. In this case you just need an little external circuit to program them.

    In case the bootloader do not support your chip, you still need an external programmer like EPIC,PONYPROg, PicStart or any other Universal Programmer like BK Precision 844a. Since the code is compile as an HEX files, you can use anything you want.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Steve,

    Steve>>MicroCode Studio is a simple code,text editor + few powerfull utility. In fact you must have PBP + MPASM (if you use 18F series) to compile your code within MicroCode Studio.<<

    This is what I call shell.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

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