Qik2s12v10 connected to 68HC11 microcontroller via Tx line

Hi,

I have a Adapt11C24DX [ 68hc11 ] microcontroller which has a power supply of 7 volt.
Also I have a qik2s12v10 motor controller which has power supply of 8 volt.

I’m sending compact commands to the qik2s12 thru Tx line of the Adapt11, and the error LED is turning on and nothing is happening.

On the qik2s12, Baud1 and 2 are shorted and Adapt11 BAUD is set to 9600.

Code:
char y;
y = SCSR;
y = SCDR;
SCDR = x ;
Do while ( SCSR.7 = 0 );

Any help, recommendation/advice would be greatly appreciated.

Thanks
Barmak

Unfortunately, we aren’t familiar with that microcontroller, so any help we can offer with your code is limited. Have you been able to get serial communication to work successfully with other devices?

What are the actual bytes are you sending to the Qik? Could you look at your serial signals with a scope and see what’s going on?

Also, could you post pictures of your setup that show all of your connections?

Brandon

Hi Brandon,

Thanks for getting back to me.

Unfortunately I don’t have a scope.

If I can make it work then will share it with you.

Good day,
Barmak

Hi Brandon,

I believe the issue is loading the program on the correct memory address.
I wrote a code to just turns a led on and off, and my code works sometimes and not the other times.

Good day,
Barmak

Weird that the LED blink code works sometimes and not other times.

What is your development environment? What compiler are you using? What tools are you using to upload the code into the device?

Hi Adam,

I’m using Microload to upload.
SBasic to code.

For the past couple of days I have uploaded a couple of versions of my program, and somehow the processor every time I push the Reset button, executes any of those versions or a mix of them.
And then in one of those Resets, executes the latest program.

Can a low voltage cause this? Or incorrect baud rate?

I’ve included for you the attached code.
After compiling the program, I have:
RBZ-Program001.a11: text 8000-80CB data 0002-0004 vector FFFE-FFFF

Thanks for the help.

Good day,
Barmak

Robo-Z.pdf (65.8 KB)

Correction: I am using Basic11.

Good day,
Barmak

That would explain the C-like syntax in your first post that I didn’t quite recognize.

I don’t think I ever used that tool back when I did play with HC11 based bots.

I don’t think I ever hit any issues like that before. So if you upload code once to the HC11 and then keep hitting reset on the HC11, it appears to run different versions of the code each time after the reset or are you uploading between each reset? How do you know it is running different versions? Different blink patterns or something?

I hate to say this but it would be a lot easier to make progress if you switched to a more modern board such as an Arduino Uno or an RP2040 based one. There are very active communities using those boards that could help point you in the right direction if you hit any issues. While I know a few people who have used the HC11 in the past, none of us are using them now.

Hi Adam,

Thanks for the reply.

You are correct, the blinking pattern of the board doesn’t go with the code I loaded into it.

Switching to another controller is my last course of action.
This board has Tx/Rx, RS232, and PortA - PortE pins to choose from.

Good day,
Barmak