Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ICD2 operating system

Status
Not open for further replies.
the reason i'm asking is , i'm wondering whether i need this ?
what does it do?
my inchworm came preprogrammed , with the bootloader,
is there a difference between the bootloader and ICD2 os?
 
The bootloader allows the computer to load the OS to the ICD2, different OS's are uploaded to the ICD2 for different ranges of chips - so, for example, if you switch from a 16F628 to an 18F series chip, then MPLAB will upload a new OS to the ICD2.

Although I wouldn't really call it an 'OS', it's just the programming software that runs on the ICD2.
 
Thanks Nigel :)
do you use MPLAB , now that you have your inchworm?
I'm just looking to get a progam into my target chip.
MPLAB is confusing as all get out isnt it?
 
If i load OS in my PIC16F877A then my Microcontroller will locked?? I mean it will be password protected after loading OS into PIC16F877A??
 
I dont think so .
but i'm not sure what you mean?
if you are talking about your target chip , it will only be code protected if you set the code protection bits in the config word.
EDIT
i mean code protected
 
Last edited:
williB said:
Thanks Nigel :)
do you use MPLAB , now that you have your inchworm?
I'm just looking to get a progam into my target chip.
MPLAB is confusing as all get out isnt it?

I've confirmed it all works, and blown a few PIC's with existing code, but that's about it so far. I'm still in a state of confusion at home at the moment, we had new heating installed and there's a lot of work following that - and we had to move loads of stuff, much of which is still in my attic!.
 
Ayne said:
williBUr Inchworm working correcly now???
Yes MPLAB recognizes it
Code:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC16F877A found, revision = b4
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
but i am still having problems getting the program into the target chip
my target is a 16F877A BTW
 
williB said:
I'm just looking to get a progam into my target chip.
MPLAB is confusing as all get out isnt it?

There is a fair degree of complexity that cannot be advoided.

Given all the chip types and all the options associated with them MPLAB is not overly complicated.

As a rule I try to be nice, never nasty, and I will try to stick with that. I
suggested you download the OS in another thread and you come here asking what the OS was ?
If you had read the you would not be asking if you need the OS.

My next suggestion is that you do not use the Inchworm without one of the exact chips used in his "Hello World" poster. Doing so will make your first experience much easier.

About bootloader, OS, and debug executive.

What Nigel said is right but let me try to make it a bit clearer.

The bootlaoder is a small program that runs on the Inchworm 16F877. About the only thing it does is allow MPLAB to download sortware (the OS) into the 16F877. A 16F877 will not work in an inchworm without the bootloader.

The OS is loaded by MPLAB to the Inchworm 16F877. The OS is used to communicate with the target chip. The OS used is dependant on the target chip type. You need to download an OS once to start with. Each time you switch between PIC12, PIC16, and PIC18 you need to download a matching OS. Set the MPLAB interface to allow it to do so automatically.

The target chip has a program of its own known as a debug executive. The debug executive is used in conjunction with the onchip debug hardware to step, breakpoint, and run programs on the target. When you program a target MPLAB will download the debug executive for you if needed.

To recap.
  • The Inchworm 16F877 must be programmed with a bootloader prior to using it with the Inchworm (ones supplied with kit have this).
  • Once you get the Inchworm assembled you have to download the correct OS. See the assembly instruction.
 
3v0 said:
There is a fair degree of complexity that cannot be advoided.

Given all the chip types and all the options associated with them MPLAB is not overly complicated.

As a rule I try to be nice, never nasty, and I will try to stick with that. I
suggested you download the OS in another thread and you come here asking what the OS was ?
If you had read the you would not be asking if you need the OS.

My next suggestion is that you do not use the Inchworm without one of the exact chips used in his "Hello World" poster. Doing so will make your first experience much easier.

About bootloader, OS, and debug executive.

What Nigel said is right but let me try to make it a bit clearer.

The bootlaoder is a small program that runs on the Inchworm 16F877. About the only thing it does is allow MPLAB to download sortware (the OS) into the 16F877. A 16F877 will not work in an inchworm without the bootloader.

The OS is loaded by MPLAB to the Inchworm 16F877. The OS is used to communicate with the target chip. The OS used is dependant on the target chip type. You need to download an OS once to start with. Each time you switch between PIC12, PIC16, and PIC18 you need to download a matching OS. Set the MPLAB interface to allow it to do so automatically.

The target chip has a program of its own known as a debug executive. The debug executive is used in conjunction with the onchip debug hardware to step, breakpoint, and run programs on the target. When you program a target MPLAB will download the debug executive for you if needed.

To recap.
  • The Inchworm 16F877 must be programmed with a bootloader prior to using it with the Inchworm (ones supplied with kit have this).
  • Once you get the Inchworm assembled you have to download the correct OS. See the assembly instruction.
Thank you for sticking with you gut feelings , and not being nasty :)
that was an excellent explaination
i shall set MPlab to automatically download the OS .
yes i read the assembly sheet from blueroom a bazillion times , its just not as clear as your explaination.
thanks again , i'll have another look at the "hello world "poster
 
williB said:
Yes MPLAB recognizes it
Code:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC16F877A found, revision = b4
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
but i am still having problems getting the program into the target chip
my target is a 16F877A BTW

Looking good.

The target chip is (on the target board or breadboard) connected to the Inchworm by the ICD cable. So you are saying that you are trying to program a 16F877A on your target board.

Yes as you said, go to the I. Follow the seven steps. Bill did a good job you should not have a problem.

If you do please include the text from the MPLAB OUTPUT window.
 
Ayne said:
If i load OS in my PIC16F877A then my Microcontroller will locked?? I mean it will be password protected after loading OS into PIC16F877A??

Nope, its fine. There would be no reason to lock it, afterall the .hex files come with MPLAB.
 
3v0 said:
Yes as you said, go to the I. Follow the seven steps. Bill did a good job you should not have a problem.

:D Thanks, I've just added a couple of comments to it based on feedback from these forums.
 
how am i supposed to know where it saved the assembly program?
 

Attachments

  • step3.JPG
    step3.JPG
    31.2 KB · Views: 337
step 4 of the project wizard is a tad perplexing
the assembly file i saved is NOT in the list....
 
Try it like this

Prior to doing any steps on the poster create a dir for your project. You may want to keep all your projects in a dir called PIC_PROJECTS. So create the dir C:/PIC_PICPROJECTS/HELLO

Now do the steps in the poster.
In step 2
Do File/ Save As… C:/PICPROJECTS/HELLO/HelloWorld.asm

In step 3
The project wizzard will want to know what the project name and directory is. You can pick the name but use C:/PICPROJECTS/HELLO for the dir. This makes sense since you already have your HelloWorld.asm there.

If you do that HelloWorld.asm will show up in the list and you can add it.

I hope that clear it up.
 
thanks so much , that helped :)
i appears that Mpasm dosnt like " org 0 "
i've saved all the previous output screens and will post them.
any ideas , i forget
Code:
;*** WDT reset toggles RB0
 list	p=16F877A
 include	<p16F877A.inc>
_config 0x3F35
 org 0000h
 bsf    STATUS,RP0
 movlw	b'00001110'
 movwf	OPTION_REG
 movlw	b'10111110'
 movwf	TRISA
 bcf		STATUS,RP0
 bcf		PORTA, 6   
 movlw	b'10000000'
 xorwf	PORTA, f
 sleep
 end
the errors
Code:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877A "hello world.asm" /l"hello world.lst" /e"hello world.err"
Error[108]   C:\PIC PROJECTS\HELLO\HELLO WORLD.ASM 4 : Illegal character (0)
Message[302] C:\PIC PROJECTS\HELLO\HELLO WORLD.ASM 8 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Message[302] C:\PIC PROJECTS\HELLO\HELLO WORLD.ASM 10 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Skipping link step.  Not all sources built successfully.
BUILD FAILED: Tue Mar 06 12:32:01 2007
almost there..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top