| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| towpew 
 
 
 Joined: 25 Sep 2015
 Posts: 24
 Location: sweden
 
 
			    
 
 | 
			
				| Hurray PIC24 BME280 error looks be solved |  
				|  Posted: Wed Jan 06, 2021 11:04 am |   |  
				| 
 |  
				|  	  | Ttelmah wrote: |  	  | Personally I'd just change all references to 'char' to 'byte'. I've found this to be the simplest thing. Only use 'char'' for things that are text. For all
 things that want a 8bit integer and to work the same on PCB/PCM/PCH/PCD,
 the byte data type is the easiest thing to use.
  | 
 
 It seems that when I change ALL char to byte in the bme280.c file
 the problem disappear
 
 I will test it more later this evening.
 
 Thanks all for helping out.
 
 //
 |  | 
	
		|  | 
	
		| towpew 
 
 
 Joined: 25 Sep 2015
 Posts: 24
 Location: sweden
 
 
			    
 
 | 
			
				| Re: Hurray PIC24 BME280 error looks be solved |  
				|  Posted: Thu Jan 07, 2021 12:20 pm |   |  
				| 
 |  
				|  	  | towpew wrote: |  	  |  	  | Ttelmah wrote: |  	  | Personally I'd just change all references to 'char' to 'byte'. I've found this to be the simplest thing. Only use 'char'' for things that are text. For all
 things that want a 8bit integer and to work the same on PCB/PCM/PCH/PCD,
 the byte data type is the easiest thing to use.
  | 
 
 It seems that when I change ALL char to byte in the bme280.c file
 the problem disappear
 
 I will test it more later this evening.
 
 Thanks all for helping out.
 
 //
 | 
 
 
 It still working fine this  change from char to byte.
 //
 |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Jan 08, 2021 1:51 am |   |  
				| 
 |  
				| Good.   
 I've made that my 'default' since I started using the PIC24/33 chips.
 Anything that is used for handling a 'value' being read in from a device, and
 wants 8 bit storage, instead of using 'char', always use 'byte'. It solves
 a lot of issues that otherwise appear....
 |  | 
	
		|  | 
	
		| towpew 
 
 
 Joined: 25 Sep 2015
 Posts: 24
 Location: sweden
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sun Jan 10, 2021 12:57 pm |   |  
				| 
 |  
				|  	  | Ttelmah wrote: |  	  | Good.   
 I've made that my 'default' since I started using the PIC24/33 chips.
 Anything that is used for handling a 'value' being read in from a device, and
 wants 8 bit storage, instead of using 'char', always use 'byte'. It solves
 a lot of issues that otherwise appear....
 | 
 
 Ok
  |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sun Jan 10, 2021 1:43 pm |   |  
				| 
 |  
				| 'default' ...definition.... the set of values some other programmer decided should be 'normal'......NOT you.....
 
 the 'default' (aka standard) for serial communications on a PC was true RS232 using a 25 pin connector........NOW the 'default' is USB3, well today, it'll change in a few moments....
 
 Jay
  |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Jan 11, 2021 1:04 am |   |  
				| 
 |  
				| No, Jay, that is to 'compiler default'. I carefully said 'my default'.....  |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Jan 11, 2021 6:01 am |   |  
				| 
 |  
				| hmm, well I guess 'default' is mine....sigh, getting old and had a newborn lamb stay overnight in my office.found out what you feed into a lamb eventually comes back out.... |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Mon Jan 11, 2021 7:10 am |   |  
				| 
 |  
				| That's true of an amazing number of newborn things...   Must admit 'lamb in the office', is not one I've encountered. Had owls,
 foxes, bats, ferrets, puppies, dogs, cats, snakes, squirrels, hamsters,
 tortoises and rats at various points.
 |  | 
	
		|  | 
	
		|  |