Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Hi Bigdog,
I try using data buffer to individually called your function. But it still give me illegal pointer conversion. Sorry, really not so good at pointer. Can advise?
ADCvalue = 0;
for (i=0; i<4; i++)
{
ADCvalue = ADCvalue + ahtoi(Data[i]);
}
- - - Updated - - -...
Hi bigdog, can I ask about the function u write, I will received the Hex string in a data buffer, let's say the 4 hex to convert into int is in data[x-4], data[x-3], data[x-2] and data[x-1]. How can I write my function in the main so that I can get the return integer?
Is it like this
unsigned...
Dear all,
I am trying to find a better way to convert a string of 4 Hex character to integer so that I can do the compare and do necessary action.
I am using a wireless communication to get ADC value from sensors and the return was string character of the value in Hex.
e.g...
Hi bigdog, it will an educational exercise. My program is done and working. Just want to beautify it and make reading and decoding easier for my junior the next time.
Dear All,
I had a DataString buffer of ASCII code read from the serial port and wanted to check and process the code if it match certain pattern. My pointer x = 0 is a CR so I check the charater before CR to match certain patterns. Is there a way to shorten the code so its more...
Hi alexxx,
Thanks for your prompt reply. I understand your program. However, GAME START and GAME ENDED is just nice having the same character number of 10. Therefore I can define _STRING_SIZE to be 10. However, I had other string that need to be compared and is not a character of...
Dear all expert,
I had setup the serial port of my MCU and its working fine. I am storing whatever I had recieved into a data buffer called
unsigned char DATA[30];
- - - Updated - - -
I am waiting for my serial port to send a string called "GAME START" and I will do some...
Hi All Expert,
I need a microcontroller that has large internal SRAM at least 2kB but small in size. Currently I found quite a lot of MCU of 2kB had at least 40 pins and above. Ended up quite big in size.
I hope to get one that has less than 40 pins as I...
Hi FvM,
Where can we find Keil uVision compiler documentation? I search around the internet and can only find the quick start guide. Not able to find the documentation that you say discussed on the setting.
Hi FvM,
I did assign unsigned char xdata Data1[500]; can compiler without error. However, once I burn in the Hex file to my MCU, all the data became a constant value which make no changes. I suspect the compiler may have assign this buffer memory to some other places thats which...
Hi Thunder,
This buffer is a variable not a constant data. I used it to read IR code once capture. Therefore I have to declare it as a variable. I am confuse as I have written the program and it works will debugger but dont work actually when i burn to my MCU. I suspect that the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.