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.

pic16f877 oscillator and accompanying resistor

Status
Not open for further replies.

shehry

New Member
in the pic16f877 data sheet, it says that you might need to use a resistor Rs if you want to operate it in HP mode. so if you want to use a 12 MHz crystal then Rs is a necessity. up till now i have been only using the 4 MHz crystal and didnt need an accompanying resistor.

However the data sheet doesnt specify the value of resistor to be used. Could anyone help?

thanks[/img]
 
shehry said:
in the pic16f877 data sheet, it says that you might need to use a resistor Rs if you want to operate it in HP mode. so if you want to use a 12 MHz crystal then Rs is a necessity. up till now i have been only using the 4 MHz crystal and didnt need an accompanying resistor.

However the data sheet doesnt specify the value of resistor to be used. Could anyone help?

thanks

I assume you mean HS mode - not HP. As you state, the data sheet says you may need a series resistor, you have interpreted that as it is a necessity. I think your worrying too much, I've used the 16F series (incl 16F877) with various crystals and without a series resistor with no ill effects. Just set it up without a resistor and stop worrying.

Mike.
 
Yes, I've never used one either, and any possible resistor would be dependent on the crystal - so MicroChip can't suggest what it might be.

Don't worry about it, just ignore it.
 
no i wasnt actually worried. i just wanted to be sure as to whether my problem was the crystal or not.

there is one other thing that might be wrong in my case. i am using the ALL-11 programmer with the software WAccess, and here is the list of hex formats from which i have to choose.

1. Binary
2. Intel Hex
3. Motorola S Record
4. PICES HEX
5. 8Bits INHX8M
6. 16Bits INHX16

could you tell me as to which format would be correct with pic16f877?

thanks for helping by the way
 
i think i had better add that in my pcwh compiler the file format in Options > file format is set to 8 bit hex
 
shehry said:
no i wasnt actually worried. i just wanted to be sure as to whether my problem was the crystal or not.

there is one other thing that might be wrong in my case. i am using the ALL-11 programmer with the software WAccess, and here is the list of hex formats from which i have to choose.

1. Binary
2. Intel Hex
3. Motorola S Record
4. PICES HEX
5. 8Bits INHX8M
6. 16Bits INHX16

could you tell me as to which format would be correct with pic16f877?

thanks for helping by the way

The format is completely irrelevent as far as the PIC is concerned, it's simply a question of what your programmer will read.
 
so how do i use the compiler to generate one of these formats. i have been trying it for 3 hours now. i have tried each and every one of them but none of them is working :(. i was using the pcwh pic c compiler
 
shehry said:
so how do i use the compiler to generate one of these formats. i have been trying it for 3 hours now. i have tried each and every one of them but none of them is working :(

I've never heard of what you are using, but what isn't working? - that's an incredibly unhelpful fault report!.
 
The default format for MPASM is Intel Hex 32 format.

As you don’t have this on your list then I suspect option 2 would work.

If not, change the MPASM format to INHX8M as that is on your list.

Mike
 
Pommie said:
The default format for MPASM is Intel Hex 32 format.

As you don’t have this on your list then I suspect option 2 would work.

If not, change the MPASM format to INHX8M as that is on your list.

The default format for MPASM is 'Intel Hex', which is an 8 bit format, and is the second one on his list. This is the only format that WinPicprog reads, very early (DOS) versions read others, but I dropped them as being a complete waste of time and effort.
 
Nigel Goodwin said:
The default format for MPASM is 'Intel Hex', which is an 8 bit format, and is the second one on his list. This is the only format that WinPicprog reads, very early (DOS) versions read others, but I dropped them as being a complete waste of time and effort.

I'm sure you know what you are talking about here as you wrote the code.

However, I came to the above conclusion by assembling a file using the 3 options. Default, INHX32 and INHX8M. The files that matched were the Default and INHX32 files!! The only difference appears to be 2 additional lines at the beginning of the file.

Mike.
 
Pommie said:
Nigel Goodwin said:
The default format for MPASM is 'Intel Hex', which is an 8 bit format, and is the second one on his list. This is the only format that WinPicprog reads, very early (DOS) versions read others, but I dropped them as being a complete waste of time and effort.

I'm sure you know what you are talking about here as you wrote the code.

However, I came to the above conclusion by assembling a file using the 3 options. Default, INHX32 and INHX8M. The files that matched were the Default and INHX32 files!! The only difference appears to be 2 additional lines at the beginning of the file.

Were you using an 18F PIC?, I believe the default for those may be INHX32?, as the Intel Hex format won't cope with it.

The MPASAM.hlp file explains all the different formats in an appendix at the end!.
 
Nigel Goodwin said:
Were you using an 18F PIC?, I believe the default for those may be INHX32?, as the Intel Hex format won't cope with it.

The MPASAM.hlp file explains all the different formats in an appendix at the end!.

No, I was using a 16F628. The HLP file does explain the formats but nowhere does is state what the default is and so I tested it. Try it, I was surprised myself as I expected it to be the 8 bit format.

Mike
 
Pommie said:
Nigel Goodwin said:
Were you using an 18F PIC?, I believe the default for those may be INHX32?, as the Intel Hex format won't cope with it.

The MPASAM.hlp file explains all the different formats in an appendix at the end!.

No, I was using a 16F628. The HLP file does explain the formats but nowhere does is state what the default is and so I tested it. Try it, I was surprised myself as I expected it to be the 8 bit format.

I've currently got to install MPASM, as I'm in the process of upgrading, but I've always run it with the default settings and it's always produced Intel Hex files - which was why I dropped all other formats from WinPicProg.

From the helpfile:

Code:
·	Intel Hex Format (INHX8M) (for standard programmers)
·	Intel Split Hex Format (INHX8S) (for ODD/EVEN ROM programmers)
·	Intel Hex 32 Format (INHX32) (for 16-bit core programmers)
 
When you get it installed, try it. As I said, I was surprised. I'm also surprised that Microchip don't state anywhere (well not that I could find) what the default setting is. BTW, what is the default processor?

Mike.
 
Pommie said:
When you get it installed, try it. As I said, I was surprised. I'm also surprised that Microchip don't state anywhere (well not that I could find) what the default setting is. BTW, what is the default processor?

Just tried it, the default output of MPASM driven from the DOS front end is INHX8M - you have to specify any change in the command line options you call it with (if any). Using the Windows front end, again the default setting produces INHX8M (Intel Hex) files.

Are you using just MPASM?, or are you using MPLAB to call it?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top