Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
Cedric Moonen22-Dec-09 21:54
Cedric Moonen22-Dec-09 21:54 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
0705646H23-Dec-09 0:02
0705646H23-Dec-09 0:02 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
Nelek22-Dec-09 22:16
protectorNelek22-Dec-09 22:16 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
0705646H22-Dec-09 22:23
0705646H22-Dec-09 22:23 
GeneralRe: Detect Acceleration and Retrieve Cell ID [modified] Pin
Nelek23-Dec-09 0:07
protectorNelek23-Dec-09 0:07 
AnswerRe: Detect Acceleration and Retrieve Cell ID Pin
Nelek23-Dec-09 0:26
protectorNelek23-Dec-09 0:26 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
0705646H23-Dec-09 0:53
0705646H23-Dec-09 0:53 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
Nelek23-Dec-09 1:42
protectorNelek23-Dec-09 1:42 
You are welcome.

[quote]
It is able to send the fixed Cell ID out. However, there is something wrong with my codes. Firstly, it is still unable to detect the acceleration. Secondly, I still unable to write the code to get the Cell ID automatically. The iWOW module is only recognised AT command.
[/quote]

As I supposed, if you can send the Test-ID out, your problem is in the interaction with the external components.

Have you checked out the links I gave you? I think I have seen an #include in one of the posts that you don't have.

I don't have enough knowledge to tell you a solution, but I am going to tell you some points I have notized or I would make to find out where the error is.

- In your "InterruptHandlerHigh()" you have 2 nested IFs without any else. I would add the elses with a pulse to a not used output of the microchip or sendind a message with "Error_IF_x" where X is the code (you told sending a fixed mesage is working ok). Because as it is you dont know which conditions is failing (if they fail).

- I see no call to your function add_accelerometer. You declare it, you program it, but you don't call it anywhere.

- In your main function you have a endless loop with the "while (1)", so the first time you get into it the variable "ADCON0" is =0b00000001 and you get "X1", then you change it to "ADCON0=0b00000101;" and get "Y1" and then you change it to "ADCON0=0b00001001;" to get Z1, but as it is a loop the next time it starts again you are missing the needed "ADCON0=0b00000001;" to read X1 a second time.
That will make you unable to read X1 until your main function starts again.

- What are ADRESSH and ADRESSL and where do they come from? I haven't seen them in your code. I guess they are constants and they are defined in one of the included .h, but if not...



I hope it helps you.

Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.

GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
0705646H27-Dec-09 15:18
0705646H27-Dec-09 15:18 
GeneralRe: Detect Acceleration and Retrieve Cell ID Pin
Nelek27-Dec-09 22:39
protectorNelek27-Dec-09 22:39 
QuestionHow to send keyboard event to other program ? Pin
wangningyu22-Dec-09 18:53
wangningyu22-Dec-09 18:53 
AnswerRe: How to send keyboard event to other program ? Pin
Rajesh R Subramanian22-Dec-09 18:57
professionalRajesh R Subramanian22-Dec-09 18:57 
AnswerRe: How to send keyboard event to other program ? Pin
KingsGambit22-Dec-09 19:16
KingsGambit22-Dec-09 19:16 
GeneralRe: How to send keyboard event to other program ? Pin
wangningyu22-Dec-09 19:21
wangningyu22-Dec-09 19:21 
GeneralRe: How to send keyboard event to other program ? Pin
Rajesh R Subramanian22-Dec-09 19:23
professionalRajesh R Subramanian22-Dec-09 19:23 
GeneralRe: How to send keyboard event to other program ? Pin
KingsGambit22-Dec-09 19:39
KingsGambit22-Dec-09 19:39 
QuestionSplit CString Pin
kumar sanghvi22-Dec-09 18:33
kumar sanghvi22-Dec-09 18:33 
AnswerRe: Split CString [modified] Pin
Rajesh R Subramanian22-Dec-09 18:51
professionalRajesh R Subramanian22-Dec-09 18:51 
RantRe: Split CString Pin
Adam Roderick J22-Dec-09 21:51
Adam Roderick J22-Dec-09 21:51 
GeneralRe: Split CString Pin
Rajesh R Subramanian22-Dec-09 23:17
professionalRajesh R Subramanian22-Dec-09 23:17 
AnswerRe: Split CString Pin
KingsGambit22-Dec-09 19:02
KingsGambit22-Dec-09 19:02 
Question/MTd' and '/clr' command-line options are incompatible Pin
Anu_Bala22-Dec-09 18:33
Anu_Bala22-Dec-09 18:33 
AnswerRe: /MTd' and '/clr' command-line options are incompatible Pin
KingsGambit22-Dec-09 19:08
KingsGambit22-Dec-09 19:08 
Questionfunction access in base and derived classes Pin
JudyL_MD22-Dec-09 8:44
JudyL_MD22-Dec-09 8:44 
AnswerRe: function access in base and derived classes Pin
Richard Andrew x6422-Dec-09 10:25
professionalRichard Andrew x6422-Dec-09 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.