CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Microchip Assembler Sample Code Configuration

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

Microchip Assembler Sample Code Configuration
PostPosted: Fri Jun 25, 2021 10:57 am     Reply with quote

The samples have no configuration line written in the code.

Do they want you to set the configuration bits in Configure/Configuration

Bits? From menu bar.

Then you uncheck the box 'Configuration Bits set in Code'?

Thanks!

MPLAB IDE 8.92
_________________
PIC Hobbyist
Ttelmah



Joined: 11 Mar 2010
Posts: 19500

View user's profile Send private message

PostPosted: Fri Jun 25, 2021 12:09 pm     Reply with quote

The samples have all the configuration bits written in the code.

In CCS, you don't explicitly set the bits. You set the fuses, and things like
setup the RS232, I2C etc., and the compiler generates the configuration
bits for you. If you load a compiled project, with the load configuration
bits option selected, you will see all the bits are set to sensible values.
Things set stuff up for you.
So
#use delay(internal=32MHz)

Will set all the fuses to setup the internal oscillator to 32MHz (on a chip that
supports this).

#use deflay(crystal=4MHz)

With setup the XT oscillator.

etc. etc..
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PostPosted: Fri Jun 25, 2021 2:05 pm     Reply with quote

https://photos.google.com/photo/AF1QipOEmb2v67dKYE1-PoJPRNaRpzvLraMXJuh_GBAj

Thank you Ttelmah

Here is screenshot.

It is configuration bits for 16F872.

How do we ADD items to the configuration bits please?
_________________
PIC Hobbyist
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jun 25, 2021 8:37 pm     Reply with quote

Quote:
Sign in
to continue to Google Photos

Your link requires a login to view it. People on here don't like logins.
Use an image host that doesn't require logins, such as imgur.com
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PostPosted: Sat Jun 26, 2021 1:01 am     Reply with quote

[img]https://photos.google.com/photo/AF1QipOEmb2v67dKYE1-PoJPRNaRpzvLraMXJuh_GBAj[/img]

Thank you PGM Programmer

See how this one looks.

This is using Image button. Last one was using URL.

How do we add to this please?
_________________
PIC Hobbyist
Ttelmah



Joined: 11 Mar 2010
Posts: 19500

View user's profile Send private message

PostPosted: Sat Jun 26, 2021 2:29 am     Reply with quote

It still requires you to login with a Google login to access it. It then doesn't
work. Gives "The requested URL was not found on this server. That’s all we
know.".
As PCM says just use one of the public photo sharing sites.

However on your chip, there are only 12 configuration bits:
Two code protection bits (however only two combinations of these
are supported)
Debug enable
Flash write enable
Date eeprom protection
Low voltage programming
Brownout reset enable
Power up timer
Watchdog enable
Two bits to control the oscillator type.

These are simply set or cleared by the fuse options:

Fuses: LP,XT,HS,RC,WDT,NOWDT,PUT,NOPUT,BROWNOUT,NOBROWNOUT,LVP
NOLVP,CPD,NOCPD,WRT,NOWRT,DEBUG,NODEBUG,PROTECT,NOPROTECT

These give every possible combination of these bits...
Regular Guy



Joined: 04 Jun 2017
Posts: 110

View user's profile Send private message

PostPosted: Sat Jun 26, 2021 11:15 am     Reply with quote

Thank you Ttelmah

1 Photos are with Google Photos.

Will see how Google Drive works.

2 We are still thinking about your Configuration Bits info.

Thanks!
_________________
PIC Hobbyist
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group