EmbeddedRelated.com
The 2024 Embedded Online Conference

printf confusion

Started by Miles Gazic in MSP43020 years ago 3 replies

I've been trying to sprintf 32-bit unsigned integers. I've used %lu and %lx, and in either case, when the most significant bit is a 1, the...

I've been trying to sprintf 32-bit unsigned integers. I've used %lu and %lx, and in either case, when the most significant bit is a 1, the data is extended with 1's to 64 bits. So if it's decimal, it'll be about 1.8e19, and if it's hex, it'll be extended with f's to 16 characters (instead of 8). The parameter list is properly being read as 32-bit parameters, and anything without a le


LMP mode and RTC

Started by Anonymous in MSP43019 years ago 3 replies

Hi All, Can anyone tell me if it's possible to put the mcu in sleep and wake up after my timerA0 has occured. Here's part of my code....

Hi All, Can anyone tell me if it's possible to put the mcu in sleep and wake up after my timerA0 has occured. Here's part of my code. But the MCU never wakes shows me the time what am I missing?? int main(void) { // Stop watchdog. WDTCTL = WDTPW + WDTHOLD; _DINT(); rtcInit(); PCD8544_init(); _EINT(); PCD8544_gotoxy(0,0); printf("It's a clo


IAR v4.11 msp430

Started by franciscocantero1 in MSP43015 years ago 12 replies

Hello, I'm experiencing some problems with printf(), sprintf(). It seems that va_start(ap,format); where va_list ap char*...

Hello, I'm experiencing some problems with printf(), sprintf(). It seems that va_start(ap,format); where va_list ap char* format Is not populating the ap with a valid address, it keeps the same address that had before running that line. while debugging if i set the ap varaiable to the address that i want it prints ok. but at runtime it doesnt print the string, it prints whatever...


Help for a beginner in MSP430

Started by Abhay in MSP43013 years ago 28 replies

Hi guys I am beginner in MSP430 programming , i need few quick tips on coding . firstly how do I make my Code Composer Studio compatible...

Hi guys I am beginner in MSP430 programming , i need few quick tips on coding . firstly how do I make my Code Composer Studio compatible with I/O statements specially "printf" I have tried every trick possible , increasing the heap/stack size well nothing worked out. secondly can anyone point whats wrong in this piece of code ******************************************************** ...


Re: printf using terminal I/O in C-SPY FET debugger

Started by Jaromir Subcik in MSP43019 years ago 26 replies

----- Paul Curtis wrote ----- > > The trick is not to impose a burden on the micro by starting/stopping it > all the time (intrusion). Some...

----- Paul Curtis wrote ----- > > The trick is not to impose a burden on the micro by starting/stopping it > all the time (intrusion). Some vendors do this with a breakpoint and > stealing a breakpoint from a processor with only two breakpoints nukes > the usefulness somewhat. CrossWorks doesn't require a breakpoint and > nor is it intrusive. We don't publish how we ach


Annoying Scanf

Started by linked82 in MSP43016 years ago 12 replies

Hi all, I'm still unable to use scanf because I can't find any useful info about how to make it work. I've implemented the getchar()...

Hi all, I'm still unable to use scanf because I can't find any useful info about how to make it work. I've implemented the getchar() and putchar() on my own code, but it still hangs when enters the scanf() or gets() functions. I know that there are low level get functions, but how to configure them? I can't understand why putchar() works fine with printf() but getchar don't. Here's may cod...


Real Time Debugging Messages using IAR/C Spy

Started by achillea88 in MSP43021 years ago 5 replies

Hello, I am a beginner with the MSP430, and I am wondering if it is possible to print debugging messages using printf or a similar function...

Hello, I am a beginner with the MSP430, and I am wondering if it is possible to print debugging messages using printf or a similar function while running your code on the MSP430. I see posts with people doing this with the LCD, but shouldn't it be possible to send debugging messages through your computers parrallel port and have them either captured into a text file or displayed in C-


porting uIP 1.0 to IAR

Started by ethernet777 in MSP43017 years ago 2 replies

Has anyone tried to port uIP 1.0 to the IAR compiler? I'm getting lots of errors and warnings such as: - function gettimeofday (or printf,...

Has anyone tried to port uIP 1.0 to the IAR compiler? I'm getting lots of errors and warnings such as: - function gettimeofday (or printf, etc.) declared implicitly - function tcpip_output (or clock_time, etc.) has no prototype - incomplete type for struct timeval (or timezone) - integer conversion resulted in change of sign - argument of type char* incompatible with parameter of type...


IAR stack size

Started by Martijn Broens in MSP43021 years ago 2 replies

Hi All, Does anyone know of a way to check how deep one is in it's stack? I'm using iar ew430 full version. The problem is that I've got a...

Hi All, Does anyone know of a way to check how deep one is in it's stack? I'm using iar ew430 full version. The problem is that I've got a function that's been called and id doesn't run like it should. For debug purposes I just inserted a little loop for (i=0; i > 14; i++) printf("value of i= %d \r\n",i); but for some reason this function doesn't run at all. Could thi


Why does int work but not float?

Started by mpbwork in MSP43016 years ago 5 replies

I use sprintf to fill a character array then send it to a LCD. It works with int but not float same for printf and the i/o window in IAR Any...

I use sprintf to fill a character array then send it to a LCD. It works with int but not float same for printf and the i/o window in IAR Any ideas? in the declerations i made static long a2dresult,temptest; float datafloat; if (present) { //sprintf(TxData3," S%d= %ld uV ",sensor2+1,a2dresult); // the above line works (when not commented out) and displ...


Looking for Binary to ASCII Code

Started by SRic...@... in MSP43020 years ago 2 replies

Hello- I'm new here and wonder if anyone has MSP430 code that will convert 16-bit binary to 5 bytes of ASCII. Prefer assembler and while I'm...

Hello- I'm new here and wonder if anyone has MSP430 code that will convert 16-bit binary to 5 bytes of ASCII. Prefer assembler and while I'm at it I could use assembler code that does a print function thru the USART. I thought of looking at assembler listing of printf but IAR freebie software wont let me view assembled version of C . Thanks - Steve / Columbus, Ohio


GNU mspgcc: error in printf

Started by mfer...@... in MSP43020 years ago

Hi! I'm new in the GNU tools. I'm using the mspgcc tools and I'm trying to compile the "timerA_uart" example program that I've found via CVS...

Hi! I'm new in the GNU tools. I'm using the mspgcc tools and I'm trying to compile the "timerA_uart" example program that I've found via CVS in the sourceforge repository. I use the extarnal makefile to compile and I've the current messages: msp430-gcc -mmcu=msp430x1121 -O2 -Wall -g -c -o main.o main.c main.c: In function `main': main.c:59: warning: implicit declaration of fu


IAR compiler and C++ code

Started by wish_akuze wish_akuze in MSP43018 years ago 3 replies

Hello I am running a C++ code in the IAR Embedded Workbench and i am having a problem with these lines : float *temp1= new...

Hello I am running a C++ code in the IAR Embedded Workbench and i am having a problem with these lines : float *temp1= new float[N]; float *temp2= new float[N]; .............. delete[] temp1; delete[] temp2; Are these declaration supported with this compiler or is there any other way of doing this? Moreover as i cannot use printf statement in IAR, i ha


SHT11 LCD Code Error

Started by "arslan.cansu1" in MSP43011 years ago

Hi Everyone; I am trying to write humidity and temperature info on Nokia6280 LCD.I can write anything on LCD.I can not write temp humi info...

Hi Everyone; I am trying to write humidity and temperature info on Nokia6280 LCD.I can write anything on LCD.I can not write temp humi info correctly.I wrote the code below.In main fuction , after while(1) program do not enter else so it cant write printf("temp:%5.1fC humi:%5.1f%% dew point:%5.1fC\n",temp_val.f,humi_val.f,dew_point); I think error never be zero.Please HELP ME. Tha



The 2024 Embedded Online Conference