Hi! I'm sorry if this is spam (I'm writing in English).
I'm trying to send commands to the LMX9820A Bluetooth module using the
MC68HC908QB8. As far as I know, after booting, the LMX9820A goes into
transparent mode. To wake it up, I have to send a special BREAK signal
(page 30 in the software users guide). So for 2M+3 bit time = 19 bit
time (M is the lenght of a character) I have to send '0', and for 19 bit
time I have to send '1', and after that I can send commands. I'm doing
what the manual says and it's not working. Where's the problem?
I'm using the 9,8304MHz crystal (that's 2,4576M operations per second).
1 instructions cycle lasts for 407 ns.
One bit in the RS transfer (9,6kbits) lasts 104,16 us. So for 19 bits it
will be 1980us, that's about 4865 instruction cycles. I'm using those
instructions to wake the LMX9820A:
1 | void MySleepBR(void){
|
2 | __asm {
|
3 | lda #1216; //Load the accumulator with the 1216 value
|
4 | label: deca; //beq takes 3 cycles to complete, deca 1 cycle
|
5 | beq label;
|
6 | }
|
7 | }
|
8 |
|
9 | void WakeBlue(void){
|
10 | sbk = 1; //start sending break signal
|
11 | MySleepBR();
|
12 | sbk=0; //stop sending break signal
|
13 | MySleepBR;
|
14 | }
|
Before I call those functions, the ESCI transmitter, receiver are
active. sbk is the the SBK bit in the SCC2.
Could you help me or have any ideas what I am doing wrong? Thank you in
adavance for any help.
Sorry again, if you think this is spam, just please delete it.
Melon