| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| HELL_FIRE_ Guest
 
 
 
 
 
 
 
			
			
			
			
			
			
			
			
			
 
 | 
			
				| Question for bit_test() |  
				|  Posted: Wed Jan 02, 2008 9:54 am |   |  
				| 
 |  
				| Hi all. Can somebody tell me, how I can release bit_test() function without to use those integrated in CCS...how to make a function which checks a one bit of variable ? Thanks to all 
 Regards
 |  | 
	
		|  | 
	
		| Heath 
 
 
 Joined: 21 Dec 2007
 Posts: 41
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Jan 02, 2008 10:03 am |   |  
				| 
 |  
				| I don't fully understand the question. |  | 
	
		|  | 
	
		| CorosanD 
 
 
 Joined: 23 Jul 2007
 Posts: 3
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Jan 02, 2008 10:09 am |   |  
				| 
 |  
				| The question is: 
 We have one variable 0b01000110, bit number 4 is "0" then the output of our function is "0", so thats the work of bit_test(var , bit) function.
 Variable: b = bit_test(  0b01000110 , 4 );
 
 well the value of 'b' is "0"
 
 The question is how to make our bit_test() function
  |  | 
	
		|  | 
	
		| Heath 
 
 
 Joined: 21 Dec 2007
 Posts: 41
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Jan 02, 2008 10:20 am |   |  
				| 
 |  
				| Why? If bit_test already does the work for you. |  | 
	
		|  | 
	
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 |  | 
	
		|  | 
	
		| Heath 
 
 
 Joined: 21 Dec 2007
 Posts: 41
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Jan 02, 2008 10:24 am |   |  
				| 
 |  
				| Oh, I had a suspicion it was a school project. |  | 
	
		|  | 
	
		| CorosanD 
 
 
 Joined: 23 Jul 2007
 Posts: 3
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Wed Jan 02, 2008 10:31 am |   |  
				| 
 |  
				| Thanks for link to previous thread I've posted. I'm fully forget it!  |  | 
	
		|  | 
	
		|  |