|
From: | James Cheong |
Subject: | FBUS initialisation protocol & timing |
Date: | Sat, 12 Oct 2002 16:53:33 +1300 |
Hi everyone
I'm trying to use the Gnokii code to interface a Nokia 5110 to
a M16C(Mitsubishi microcontroller) to send SMS. I'm using software
delays to generate the 100us delays and I having some trouble with the
initialisation process.
Below is the pseudo code of
what I've done and a list of 5 questions, hope you can find time to answer
them.
:
) for (count = 0; count <
32; count ++) {
delay_us(100); transmit 0x55; } transmit 0xc1; SendStatusRequest();
delay_us(100); SendMsg(7, 0x02, connect1); // Initiate connection delay_us(100); SendMsg(5, 0x02, connect2); delay_us(100); SendMsg(7, 0x02, connect3); delay_us(100); SendMsg(4, 0x64, connect4); // Phone ID request delay_us(100);
// ???
GetNokiaAuth(IMEI,
MagicBytes, magic_connect+4); //270us to execute
SendMsg(45, 0x64, magic_connect); //180us lag before change in Tx Pin FB61_SendSMSMessage(
); // any delays need???
1)First of all, do you
transmit the end_init_char (0xc1) right after the 32nd 0x55 char??? Or is a
100us delay needed?
2)For the SendMsg( )
functions, is a 100us delay between frames very important? Has anyone check with an
oscilloscope to ensure that there is 100us delay between each frame? Because
I've noticed with my micro, that the processing involved for SendMsg( ) can be
quite significant for longer message lengths and I have to tweak the code to
ensure 100us delays between frames.
3) What is the delay used
between the "SendMsg(4, 0x64, connect4)" frame and the "SendMsg(45, 0x64,
magic_connect)" ?
My code wouldn't work if a
100us delay there is required because even if I have no delays in after calling
SendMsg(4, 0x64, connect4); there is an inherent processing delay caused by
GetNokiaAuth( ).
4)According to the
protocol, is the first frame u receive from the phone an acknowledgement for the
SendStatusRequest( )? Currently, I'm not receiving any frames from the phone at
all.
: (
5) Is the above pseudo code
all that is needed to initialise the link with the 5110? Can I call the
FB61_SendSMSMessage( ) right after initialisation is successful???
Thanks very much for your
time.
James
7 Days without Soccer makes
one WEAK!
|
[Prev in Thread] | Current Thread | [Next in Thread] |