# mc68hc11 CME11E9-EVBU board

Status
Not open for further replies.

#### ProFPGA

##### Banned
I am trying to blink leds connected on portc in hc11 , it is in expanded mode .
here's the code :

LDAA #$FF STAA DDRC ; Making Port C Output LDAB #$00 ; Pulling all pins down
STAB PortC
** a delay
LDAB #$FF STAB PortC but nothing happens , i have measured the voltage level it never goes up or down 2.45Vdc . any clues ????? #### futz ##### Active Member I am trying to blink leds connected on portc in hc11 , it is in expanded mode . here's the code : LDAA #$FF
STAA DDRC ; Making Port C Output
LDAB #$00 ; Pulling all pins down STAB PortC ** a delay LDAB #$FF
STAB PortC

but nothing happens , i have measured the voltage level it never goes up or down 2.45Vdc .

any clues ?????
Don't forget a second delay after setting PortC high, like this:
Code:
       LDAA #$FF STAA DDRC ; Making Port C Output LDAB #$00 ; Pulling all pins down
STAB PortC
** a delay
LDAB #$FF STAB PortC [COLOR="Red"]**another delay[/COLOR] Without the second delay the LED is on for such a short time you can't see it, much less measure it with a meter. Also, your code doesn't show it so I'll mention it in case you don't know - a label at the top of that bit of code and a branch to the top of it so it loops. Like this (excuse my ultra-rusty HC11 coding and adjust to suit): Code: loop LDAA #$FF
STAA DDRC ; Making Port C Output
LDAB #$00 ; Pulling all pins down STAB PortC ** a delay LDAB #$FF
STAB PortC
[COLOR="Red"]**another delay[/COLOR]
bra   loop

Last edited:

#### ProFPGA

##### Banned
Don't forget a second delay after setting PortC high, like this:
Code:
       LDAA #$FF STAA DDRC ; Making Port C Output LDAB #$00 ; Pulling all pins down
STAB PortC
** a delay
LDAB #$FF STAB PortC [COLOR="Red"]**another delay[/COLOR] Without the second delay the LED is on for such a short time you can't see it, much less measure it with a meter. Also, your code doesn't show it so I'll mention it in case you don't know - a label at the top of that bit of code and a branch to the top of it so it loops. Like this (excuse my ultra-rusty HC11 coding and adjust to suit): Code: loop LDAA #$FF
STAA DDRC ; Making Port C Output
LDAB #$00 ; Pulling all pins down STAB PortC ** a delay LDAB #$FF
STAB PortC
[COLOR="Red"]**another delay[/COLOR]
bra   loop
Well this was a part of the code that i copied .
I have solved part of the problem , i.e in expanded mode i can not use port c , as i am trying to use here .

So i switched to port d instead , but i ran into problems there as well .
I tried to write certain values to port d in buffalo i.e

mm 1009 // DDRD

#$3F // To make port d output mm 1008 #$31

// and then i continued to 2, 3, .... A and F

But strangly only leds after $34 changed and remained unchanged till #38 I also have to use hc11 in expanded mode cuz i have to enable xirq !!!! they dont show the binary equivalent of all the numbers i tried to write ??? i am confused ??? any help plzzz Last edited: #### kchriste ##### New Member Forum Supporter they dont show the binary equivalent of all the numbers i tried to write ??? You really need to look at the datasheet for the 68HC11. Port D is only 6 bits and two of those bits are used for Rx and Tx data for the UART which is the communication path for the Buffalo monitor program. I also have to use hc11 in expanded mode cuz i have to enable xirq !!!! I don't see why this would be so. Explain. #### ProFPGA ##### Banned Yes i am aware of that Port D has only 6-bits active , thats why each number has$3 and the binary that i want to display . but still dosent makes sense .

I am using CME11E9-EVBU board , i have tried using xirq in single chip mode and there wasnt any reaction , but i did worked in expanded mode .

????

#### kchriste

Forum Supporter
I can now run it in single chip mode and also at address $0100 . #### barfleur ##### New Member i have fixed the problem , it was the start address of my program i.e$2000.
I can now run it in single chip mode and also at address \$0100 .

Yes you fixed the problem, good on you, that's the spirit. Now you'll need to investigate why it wasn't working before.

Cheers

Status
Not open for further replies.