Some basic questions

General problems? Ask here!

Moderator: cbarnes

Some basic questions

Postby fyanardi » Mon Feb 26, 2007 8:24 pm

Hi,

First of all pardon me for my newbie questions. Here are my questions, (I have an Adapt9s12E128 board):

1. From what I've read from the manual, maximum bus clock is 24 MHz with PLL. But if I write a code to control the I/O lines, and dissasemble it, one C instruction to set a PORT consists 4 clock cycles, and to turn off a port consists of 3 clock cycles. E.g: PTP = 0x01 is dissasembled as: LDAB #1 (1 clock cycle) and STAB _PTP (3 clock cycles). Does it mean that all I/O lines need more that one clock cycle to change state?

2. Can I use ECLK to drive other device but I don't want to use the Multiplexed External Bus Interface? I mean I only use the ECLK to provide the clock to other device. I think in the manual it is not stated clearly whether I can do that or not.

3. I don't want to buy Code Warrior Standard Edition (since too expensive for me as student, and I don't want to struggle with all assembly codes), and want to use GCC compiler for HC12 , is there anything I should aware of?

Thanks for reading my questions
fyanardi
Newbie
Newbie
 
Posts: 4
Joined: Wed Feb 14, 2007 8:04 pm

Postby ed taylor » Tue Feb 27, 2007 4:14 pm

hi:

we all start at the beginning!

the c compiler is generating un-needed instructions. in assembler your example would be:

movb, #1.PTP

the eclk can be enabled see the MEBI section, and look for the PEAR register.

code warrior has a limited amount of code that can be compiled in the free package. i think it is 32k. if you don't expect to have programs that exceed this, i would very highly recommend it!


good luck on your studies!

ed
ed taylor
Master
Master
 
Posts: 174
Joined: Wed Jan 19, 2005 10:20 pm
Location: calgary alberta

Postby fyanardi » Tue Feb 27, 2007 9:15 pm

Hi,

Thanks for answering my questions :)

However I still have doubts about ECLK. Can I just use the ECLK without using the external expansion bus facility? For example in normal single-chip mode can I turn on ECLK in PEAR? or in normal expanded mode can I use Port A and B as general I/O? since I only want to make use the ECLK, and I don't want the functionality of external bus interface. The board is still being shipped and in the meantime I'm trying to figure out what I want to do with the microcontroller.

Thanks

Fredy
fyanardi
Newbie
Newbie
 
Posts: 4
Joined: Wed Feb 14, 2007 8:04 pm

Postby erarama » Wed Feb 28, 2007 7:21 am

YOu can enable ECLK by itself without the MEBI being enabled
erarama
Master
Master
 
Posts: 541
Joined: Sun Apr 04, 2004 10:59 am
Location: Canada

Postby fyanardi » Thu Mar 01, 2007 1:12 am

Ah I see, I'm going to try the ECLK immediately. Thanks for the answer.
fyanardi
Newbie
Newbie
 
Posts: 4
Joined: Wed Feb 14, 2007 8:04 pm


Return to General Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron