CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CCS lcd routine on HCS12 / codewarrior.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Rob
Guest







CCS lcd routine on HCS12 / codewarrior.
PostPosted: Fri Apr 25, 2008 3:05 am     Reply with quote

Hi to all.
I am porting some code from a PIC to a HCS12 micro. I want to use the
same lcd routines on the new micro. I seem to have it mostly figured out
but I,m not sure how to "map" the lcd structure onto the hcs12 port(Port AD I/O Register; address 0x00000270)
I'm fairly new to this sort of stuff and am a bit stuck.

Ive tried this , but it does not work. It compiles but the outputs don't work.
My lack of "C" knowledge is letting me down here I think :0(


Code:


struct lcd_pin_map

         char unused   :1;     
         char enable    :1;
         char rs           :1;               // access to the LCD pins.
         char rw          :1;
         char data       :4;                    // The bits are allocated from
};

struct lcd_pin_map lcd;

#define lcd_pin_map lcd @ (*((volatile unsigned char *)(REG_BASE + 0x00000270)))

Any help appreciated.

Cheers
Rob
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Apr 25, 2008 5:32 am     Reply with quote

Depending on what C Compiler you use for that platform there are a number of possibilities. This a PIC forum not HCS12 and what works in CCS may or may not work for whatever compiler you are using for the HCS12. You need to ask in that forum to get the best information.

Here are some links:
http://forums.freescale.com/freescale/board?board.id=16BITCOMM

http://www.pemicro.com/forums/index.php?showforum=4

http://www.programmersheaven.com/mb/?S=B20000

http://forums.devshed.com/

http://elmicro.com/hc12web/index.html
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group