| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Regular Guy 
 
 
 Joined: 04 Jun 2017
 Posts: 110
 
 
 
			    
 
 | 
			
				| Microchip Assembler Sample Code Configuration |  
				|  Posted: Fri Jun 25, 2021 10:57 am |   |  
				| 
 |  
				| 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: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Jun 25, 2021 12:09 pm |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Jun 25, 2021 8:37 pm |   |  
				| 
 |  
				|  	  | 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sat Jun 26, 2021 1:01 am |   |  
				| 
 |  
				| [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: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sat Jun 26, 2021 2:29 am |   |  
				| 
 |  
				| 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
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sat Jun 26, 2021 11:15 am |   |  
				| 
 |  
				| 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
 |  | 
	
		|  | 
	
		|  |