Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with setting the config bits of PIC16F676 in Assembly

Status
Not open for further replies.

chevymn1964

Full Member level 2
Joined
Apr 1, 2006
Messages
120
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,296
Location
Santa Rosa, Ca.
Activity points
2,551
Hello Everyone! Got a quick question.... Im having problems setting the config bits on a 16F676 in assembly I want to use the internal osc with the ports set as I/O Example: __config _cp_off & _wdt_off & _pwrte_on & _INTOSC_???????
I cant figure out what to put after the _INTOSC Each time I update the project I get an error saying:Error[113] C:\PROGRAM FILES\MICROCHIP\DOCS\PIC DVM 16F676.ASM 33 : Symbol not previously defined (_INTOSC) any Ideas?????
Thanks!
 

_intrc_osc_noclkout

Code:
_CPD                         EQU     H'3EFF'
_CPD_OFF                     EQU     H'3FFF'
_CP                          EQU     H'3F7F'
_CP_OFF                      EQU     H'3FFF'
_BODEN                       EQU     H'3FFF'
_BODEN_OFF                   EQU     H'3FBF'
_MCLRE_ON                    EQU     H'3FFF'
_MCLRE_OFF                   EQU     H'3FDF'
_PWRTE_OFF                   EQU     H'3FFF'
_PWRTE_ON                    EQU     H'3FEF'
_WDT_ON                      EQU     H'3FFF'
_WDT_OFF                     EQU     H'3FF7'
_LP_OSC                      EQU     H'3FF8'
_XT_OSC                      EQU     H'3FF9'
_HS_OSC                      EQU     H'3FFA'
_EC_OSC                      EQU     H'3FFB'
_INTRC_OSC_NOCLKOUT          EQU     H'3FFC'
_INTRC_OSC_CLKOUT            EQU     H'3FFD'
_EXTRC_OSC_NOCLKOUT          EQU     H'3FFE'
_EXTRC_OSC_CLKOUT            EQU     H'3FFF'
 
pic16f676perojakt

chevymn1964 said:
Hello Everyone! Got a quick question.... Im having problems setting the config bits on a 16F676 in assembly I want to use the internal osc with the ports set as I/O Example: __config _cp_off & _wdt_off & _pwrte_on & _INTOSC_???????
I cant figure out what to put after the _INTOSC Each time I update the project I get an error saying:Error[113] C:\PROGRAM FILES\MICROCHIP\DOCS\PIC DVM 16F676.ASM 33 : Symbol not previously defined (_INTOSC) any Ideas?????
Thanks!

You are writing in assembly language, I think you are using the MPLAB IDE.

When you are writing in this editor and you want to define something very specific from the device like the fuses, you must open the *.inc file.
In your case you must open the P16F676.INC file. You must find this file in: [Program Folder]\MPASM Suite\P16F676.INC
Look in this file the information under the title ; Configuration Bits

In your case you have:

_INTRC_OSC_NOCLKOUT EQU H'3FFC'
_INTRC_OSC_CLKOUT EQU H'3FFD'

So, if you want to use the internal oscilator, you must select one of the two possibilities:

_INTRC_OSC_NOCLKOUT
_INTRC_OSC_CLKOUT

Note that _INTOSC is not defined.

By,

GuillerMo (AR)
 
adc using 16f676

Thanks for the help. Its funny how the easy things can put you in a LOOP.... Now if I can figure out how to work the ADC's all would be great! lol
 

p16f676.inc

chevymn1964 said:
Thanks for the help. Its funny how the easy things can put you in a LOOP.... Now if I can figure out how to work the ADC's all would be great! lol

Try to do it yourself, if you have any problems first of all make a search in the site, and if no available information about your problem, you could ask via a topic.

By,

GuillerMo (AR)
 

pic16f676 a/d converter

Hey everyone! yet I have another problem.... Im trying to figure out how to use the adc on RA0 and then display the result on an lcd in Volts.... I am using ra0-ra3 as inputs and ra4 as an output... portc is set as all outputs for the lcd.... Here is the strange part...... when I run the code in a mplab it will work fine and I can display text on both lines (16x2) with no porblem until i read the adc, convert b2bcd and then display on lcd. Unstead of displaying to portc I can see the trisc bits switching but they should be sent to portc???????

Added after 7 minutes:

NEVERMIND!!!! Got her working!!!! I was selecting the wrong banks for the resuth &resultl.................
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top