• 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.

PIC16F883 questions

Status
Not open for further replies.

bananasiong

New Member
Hi,
I'm trying to use this PIC, 16F883. After reading the datasheet, I started to program and I found that there are 2 configuration settings (fuse settings), i.e. config1 and config2. After trying a few times, this configuration setting gives no error:
Code:
	LIST P=16F883
	#include <P16F883.inc>
	ERRORLEVEL   0,   -302
_config1	EQU	0x2007
_config2	EQU	0x2008
	__config	_config1,	0x38E1
	__config	_config2,	0xFFFF
Am I doing the right way? For the config2, I don't use brown off reset and the code are not protected, so my setting 0xFFFF should be correct. But MPLAB gives me this message:
Message[303] G:\PIC\EXAMPLES\MY\16F883\RFLED\RFLED.ASM 7 : Program word too large. Truncated to core size. (FFFF)
About the code protection, I know that once it is enabled, in order to reprogram the chip, bulk erase has to be performed. I have read the memory programming specification and also the reference book by Myke Predko, customizing and programming PICmicro microcontroller. Both showing the table as attached. But I'm not quite understand. Should I write my new program, and insert a few lines into the beginning which are the instructions that giving the value to the configuration word and calling the delay?
 

Attachments

blueroomelectronics

Well-Known Member
  1. __CONFIG, CONFIG1, is correct
  2. but Fxxx is not, it's only a 14bit variable ie: 3FFF
  3. Use MPLAB and pull down the config settings, they will tell you the HEX value.
  4. 0x3FFF is the default after erasing. No need to set it if that's what you want.
 
Last edited:

bananasiong

New Member
blueroomelectronics said:
but Fxxx is not, it's only a 14bit variable ie: 3FFF
But for config2, according to the datasheet, bit 15 to bit 11 are unimplemented, so read as '1'. That's why I put F over there.
Use MPLAB and pull down the config settings, they will tell you the HEX value.
What does it mean?
0x3FFF is the default after erasing. No need to set it if that's what you want.
How to perform bulk erase?

Thanks
 

blueroomelectronics

Well-Known Member
There is a pull down menu for all the config fuses on whatever PIC you're working on.
And just ignore bit 11, do not enter a value larger than 14bits, 0x3FFF is the largest value in 14 bits. Try it.
 

bananasiong

New Member
How come. This is so weird. The price of PIC16F873A is twice of the PIC16F883 and 883 has 8 MHz internal oscillator, more I/O pins, extra Fail-Safe Clock Monitor feature. Then who's going to use the more expensive ans less function one?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
bananasiong said:
How come. This is so weird. The price of PIC16F873A is twice of the PIC16F883 and 883 has 8 MHz internal oscillator, more I/O pins, extra Fail-Safe Clock Monitor feature. Then who's going to use the more expensive ans less function one?
Nothing weird about it, like most things later ones are cheaper to make and usually higher spec - more modern production methods are more effective and cheaper. Notice that the 873 changed ages back to the 873A, a later silicon version - the price dropped then as well - new silicon, cheaper to make.
 

bananasiong

New Member
If I don't use brown off reset and code protection for 883, can I just ignore config2 setting? Or I need to disable them?
 

blueroomelectronics

Well-Known Member
Well the top o the (14bit) line 16F887 is $3.50 qty 10. But the 16F877A it replaces will be around for years.

As for the 883, brownout default is 4v so unless you're running less than 4v ignore it.
 
Last edited:

PARASTOO

New Member
Hi
i wana imigrate from pic16f873 to pic16f883
is there anyone can help me?
I have an asm program that written mpasm
and another c program that written ccs 3.225
if anyone can pls reply me i can send their files
my email
[email protected]
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top