Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help with code on MCC18

Status
Not open for further replies.

hissokaaaa

Newbie level 3
Newbie level 3
Joined
May 27, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,295
Hello,
I want to change this code to a code with C18 of Microchip , i tryed "struct" but it wouldint work , help please
Code:
bits control_bits;
#define start_new_command	0x00	
#define status_written		0x01	
#define advance_state		0x02	
#define trickle_charge_disable	0x03
Code:
if (control_bits.start_new_command)
	{
		control_bits.status_written = FALSE;
         }
 
Last edited:

These can be used as it is in any C Compiler.


Code C - [expand]
1
2
3
4
#define start_new_command   0x00    
#define status_written      0x01    
#define advance_state       0x02    
#define trickle_charge_disable  0x03

 

thanks for your reply;
sorry i copied the wrong code,
Code:
control_bits.status_written = FALSE;
this won't work without 'control_bits 'declaring as "stuct" isn't?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top