Jump to content
Sign in to follow this  
Melissa

New to C2C Compiler

Recommended Posts

Hi,

 

I am new to the C2C compiler and am after some help.  Whilst I am reasonably confident with the C language and to a degree the C++ language I am having problems understanding the following things:

char option@0x81 - effectivly points option towards the option register!! but how do I address the individual bits of that register?  Do I have to use something similar to:

char psa@0x03

 

Hope this makes sense.

 

 

Melissa

 

PS are there any header files out there written for all the common devices??

 

Luv ya all xxx :)

Share this post


Link to post
Share on other sites

char porta@0x81;

 

The @ operator allows you to specify that the variable is located at the specified address.

 

This allows the syntax of

porta = 0xFF; // set all port a bits on

 

porta |= 0x01; // turn bit 0 on

porta &= 0xFE; // turn bit 0 off

 

 

Individal bit addressing is NOT currently supported in the form

porta_bit0 = 1;

 

 

Checkout the help that is part of the installation or //www.picant.com/c2c/doc/c2c.html and search for built in variables.

 

???  ???

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...