Question

Here are the choices for each of the 15 configuration options in the 2 words that...

Here are the choices for each of the 15 configuration options in the 2 words that we have used:

__CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF

__CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LVP_OFF

List how many bits for each option and explain why we chose each option or if it makes no difference.

3. How many bits in each configuration word?

4. How many different modes can the system clock operate?

5. Why do you think this chip has so many different clock modes?

6. List some applications you can think of which would require each different (High, Medium and Low) accuracy of the clock. I.e. for high accuracy the PIC16F1829 could be the guts of a timer for a track meet.

Homework Answers

Answer #1

The Code given is:

_CONFIG _CONFIG1, _FOSC_INTOSC&_WDTE_OFF&_PWRTE_OFF&_MCLRE_ON&_CP_OFF&_CPD_OFF&_BOREN_ON&_CLKOUTEN_OFF&_IESO_OFF&_FCMEN_OFF

__CONFIG _CONFIG2, _WRT_OFF&_PLLEN_ON & _LVP_OFF

Lets first know the meaning of all this codes individually then we will deal with the problems given.One does not have to use every setting, if left out, it will use the default on power up. These can also be set via MLAB X in the project.

-- Configuration 1 settings

_FOSC_INTOSC - This was chosen for we are using the internal oscillator. One can connect an external oscillator to the pic, and there are quite a few choices.

_WDTE_OFF – watchdog timer is rarely used, so Normally disable it.

_PWRTE_OFF - People normally turn off the power up timer. This timer is useful if we want to let the rest of the circuit stabilize before the picture starts executing its code. So here are the choices:

Code:

_PWRTE_ON        ; PWRT enabled

_PWRTE_OFF        ; PWRT disabled

MCLRE_ON - People enable the Master Clear/Reset pin. Looking at the data sheet, this pin can also be used an input pin. If one uses it as an input pin, one needs to turn off the Master clear function.

_CP_OFF - This disables code protection. If you want to not allow an external reader to read your program memory, then enable this function. If enabled , attempts to read program memory from and external device will return all 0's

_BOREN_ON - This enables the brown out reset function. If the voltage to the chip falls below a certain voltage, the chip is held in reset mode until the voltage rises. The level of the voltage is set by options in the CONFIG2 word.

_CLKOUTEN_OFF - This disables the Fosc/4 clock on pin3. In exercise 1, this was enabled to aid in determining if we had set the internal oscillator correctly. This output can be used as a clock to source to other components in your circuit. If not using this function, are using the pin for other purposes, disable this function.

_IESO_OFF - This disables internal/external switchover of the oscillator. If one is going to switch between internal/external oscillator functions real time, enable this setting.

_FCMEN_OFF - Disable the Fail-save clock monitor. The fail safe clock monitor will detect a failure on an external oscillator and automatically switch over to the internal oscillator if enabled.

In Configuration Word 2. The Sections of the Flash memory can be protected from self writes. If one had a boot loader, this would prevent it from being overwritten from internal writes. Note, this prevents your firmware from writing to these sections of flash.

_PLLEN_ON - Enable the 4x Phase Lock Loop circuitry. Enable this to achieve the desired clock rate for the internal oscillator

_SRVREN_OFF - Disable the stack overflow. The stack is 16 levels deep. This limits the nesting of calls to subroutines that can be made. If too many calls are made (or too many returns versus calls), causing this to exceed the number, it will cause an reset if enabled.

_BORV_LO: _BORV_LO means Brown out trip point. If the brown out reset is enabled, this setting determines the voltage level it will trip.

_LVP_OFF : _LVP_OFF is used in Low voltage programming enabled. This is used to supports a low voltage programming mode.

;method using a #define to partially emulate PIC18 config directive

#define CONFIG cfgword=cfgword &

variable cfgword=0x3fff    ;initialise CONFIG to defaults

;now the individual options

CONFIG _INTRC_OSC_NOCLKOUT    ;8 MHz and OSC pins are I/O with:

CONFIG _IESO_OFF             ;no switchover

CONFIG _FCMEN_OFF            ;or failsafe

                          ;

CONFIG _WDT_OFF                ;NO WDT

CONFIG _PWRTE_OFF            ;Power up delay disabled

CONFIG _MCLRE_OFF            ;no /MCLR, use as input

CONFIG _CP_OFF ;no code protect

CONFIG _BOR_OFF                ;No BOR for low voltage operation

From the PIC16F1829 data sheet, the part has a 14-bit configuration word.

        --------------------------------------------------

                   PIC16F1829 Configuration Bits

        --------------------------------------------------

        13 ___________ 4 3 2 1 0

        --------------------------------------------------

        Code protect    | | |__|____ Osc type 11 = RC

             0 = on       | |                     10 = HS

             1 = off      | |__ WDT               01 = XT

                          |        0 = disabled    00 = LP

                          |        1 = enabled

                          |

                          |__ Power-up timer

                                0 = enabled

                                1 = disabled

Looking at the list of equates for the configuration bits in Microchip's Device Header File reveals the following:

                       _CP_ON     EQU   H'000F'

                       _CP_OFF   EQU   H'3FFF'

                       _PWRTE_ON EQU   H'3FF7'

                       _PWRTE_OFF EQU   H'3FFF'

                       _WDT_ON    EQU   H'3FFF'

                       _WDT_OFF   EQU   H'3FFB'

                       _LP_OSC    EQU   H'3FFC'

                       _Xt_OSC    EQU   H'3FFD'

                       _HS_OSC    EQU   H'3FFE'

                       _RC_OSC    EQU   H'3FFF'

Notice that Microchip uses upper case.

The default configuration bit pattern is all 1's or H'3FFF'. Programming involves changing the 1's that need changing to 0's.

The configuration bit equates are repeated with the bit patterns for the least significant for bits along side to make a point.

                       _CP_ON     EQU   H'000F'   1111

                       _CP_OFF    EQU   H'3FFF'   1111

                       _PWRTE_ON EQU   H'3FF7'   0111

                       _PWRTE_OFF EQU   H'3FFF'   1111

                       _WDT_ON    EQU   H'3FFF'   1111

                       _WDT_OFF   EQU   H'3FFB'   1011

                       _LP_OSC    EQU   H'3FFC'   1100

                       _Xt_OSC    EQU   H'3FFD'   1101

                       _HS_OSC    EQU   H'3FFE'   1110

                       _RC_OSC    EQU   H'3FFF'   1111

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. The memory units that follow are specified by the number of words times the number...
1. The memory units that follow are specified by the number of words times the number of bits per word. How many address lines and input/output data lines are needed in each case? (a) 8K X 16 (b) 2G X 8 (c) 16M X 32 (d) 256K X 64 2. Give the number of bytes stored in each memory unit in question 1. 3. Word number 563 decimal in the memory shown in Fig. 7.3 (see Mano-Ch7.pdf) contains the binary...
Writing a program in Python that reads a text file and organizes the words in the...
Writing a program in Python that reads a text file and organizes the words in the file into a list without repeating words and in all lowercase. Here is what I have #This program takes a user input file name and returns each word in a list #and how many different words are in the program. while True:   #While loop to loop program     words = 0     #list1 = ['Programmers','add','an','operating','system','and','set','of','applications','to','the','hardware',          # 'we','end','up','with','a','Personal','Digital','Assistant','that','is','quite','helpful','capable',           #'helping','us','do','many','different','things']        try:        ...
Post a response (2-4 sentences each). You can start a discussion by pointing out additional reasons...
Post a response (2-4 sentences each). You can start a discussion by pointing out additional reasons why you think this source is or is not credible. You can also suggest ways in which the site could be improved (is there information or are there sources they could have added? Are there different messages that would be more appropriate?). Write at least 1 response-post for each of the THREE “Part 1” posts you read (you will need at least 3 responses...
Response for those questions please,  "Resumes and Other Employment Materials" in Strategies for Technical Communication . (...
Response for those questions please,  "Resumes and Other Employment Materials" in Strategies for Technical Communication . ( please don't copy from any website, your own word) Despite the many online job search tools available, why does our textbook say that "The human connection is always the best way to start looking for a job" (133)? Who are some people you could talk to on campus for job search help? Are there people you know outside of campus that could be resources...
300 words:      (b) Do you think that it is appropriate for firms like Black Diamond...
300 words:      (b) Do you think that it is appropriate for firms like Black Diamond to scrutinize its partner factories like this?      (c) Why or why not? case study Task: Read the “Black Diamond Equipment” case below and then answer the following questions. >> The way that Black Diamond is run, I don't really consider this the American way, I consider Black Diamond an extension of the attitude, the culture, the ethos, and the values of the life...
Case No 2 At times when “everybody’s doing ERP”, users say they can still gain a...
Case No 2 At times when “everybody’s doing ERP”, users say they can still gain a competitive advantage from implementing ERP systems. Users of ERP can have competitive advantage from the way they implement the systems and can best make use of resulting data. Also, users say the system can make them more nimble in the marketplace than companies with hard to change custom programs. ERP users can identify the biggest gain is that they force a company to institute...
1/Which of the following choices does not list one of the sun’s atmospheric layers A/ photosphere...
1/Which of the following choices does not list one of the sun’s atmospheric layers A/ photosphere B/ corona C/ convection zone D/ chromosphere 5/ suppose that C fuses with He. What is the product A/ C B/ N C/ O D/ Be 8/ if the Sun’s core temperature went out of balance and decreased a little, pressure in the core would……and the core would…., causing the core temperature to…, which in turn would…the reaction rate, thus bringing it back to...
Complete the following activities and then post your responses in the Activity #5 discussion forum (link...
Complete the following activities and then post your responses in the Activity #5 discussion forum (link below). Consider a short multiple choice quiz with three items, and each item has four choices (only one of the choices is correct). Suppose that you are taking this quiz but you are completely and utterly unprepared for it. That means that you only option for the quiz is to guess the answers. Suppose you are thinking about the first item: what's the probability...
1. Explain and give examples of the 5 existing business model patterns. 2. Can the business...
1. Explain and give examples of the 5 existing business model patterns. 2. Can the business below use that business model pattern? Explain. Overview- We are going to start a bakery business as I have my interest in bakery. This is going to be start-up business plan. The name of our Bakery would be “Bake It or Make It”. It would be managed by me along with my team of new bakers around the city. Opening a bakery at initial...
As you saw from the lab PowerPoint slides last week, you will be doing a research...
As you saw from the lab PowerPoint slides last week, you will be doing a research study looking at ‘Aggression Priming” for your first paper. For this week’s discussion, I want you to discuss with your group what you think this study is about. What is the hypothesis? What theory does it come from? What do you predict will happen (do you expect something different than the hypothesis in the researcher instructions? If so, what and why?)? Do you think...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT