int int_val = 0x12345678;
ptr = (char*)(&int_val);
arr = *ptr;
arr = *ptr;
arr = *ptr;
arr = *ptr;
Microcontrollers :: 01-24-2017 11:59 :: xpress_embedo :: Replies: 4 :: Views: 462
can't be expected to perform correct autobaud. Characters 'A' and 'T' must be send individually with surrounding delay, AT commands should be terminated by rather than .
Message send should wait for '>' request, or at least wait longer.
LCD initialization has required delays > 1 ms, read datasheet.
Microcontrollers :: 11-16-2016 10:30 :: FvM :: Replies: 2 :: Views: 488
Many compilers allow printf and scanf by redefining standard character IO routines but we don't know what compiler or MCU is being used.
Strtok does exist in PHP but this looks to be 'C' code. Maybe the wrong code tag was applied to the text.
I'm not sure what 'strstrf' does, it isn't a standard C function. If it just returns yes/no if one strin
Microcontrollers :: 09-18-2016 21:50 :: betwixt :: Replies: 7 :: Views: 652
Although you have not faced to that issue up to now, your code is likely to lose counts. The variable pulse_cnt within the main() loop will be not incremented once in awhile, due to be sequentiated by the printf() function, particularly for low baud rates. You should check PULSE variable and increment counts within the ISR vector.
Microcontrollers :: 06-24-2016 12:25 :: andre_teprom :: Replies: 6 :: Views: 545
int a , b;
a = 10;
printf( "Value of b is %d\n", (a == 1) ? 20: 30 );
printf( "Value of b is %d\n", (a == 10) ? 20: 30 );
what ? and : performing in code
Microcontrollers :: 04-06-2016 17:47 :: kushal nandanwar :: Replies: 2 :: Views: 493
Hi, i compiled the following code
using arm-gcc cross compiler and dumped its objdump file ,the executable is prefectly running on uclinux on cortex m3,can you tell me what each column represents in that file , a few lines are given below
Microcontrollers :: 03-30-2016 09:55 :: raghavkmr :: Replies: 1 :: Views: 609
printf("AT+CMGS=+33665343539\r"); is the problem
correct format : AT+CMGS="XXXXXXXXXXX"\r
Dont use "+" and use double quotes before and after the number
Microcontrollers :: 02-27-2016 12:16 :: nandhu015 :: Replies: 10 :: Views: 1755
You are missing the enter key code \n or 0x13 after sending AT command.
My code looks like below, instead of writing own puts, its better to use built in printf
Microcontrollers :: 02-06-2016 05:57 :: gamegurus :: Replies: 1 :: Views: 2509
The below is not doing perfectly as per my clarify me regarding this .
#define base_addr 0x20000000
int *GPIO1=(int *)base_addr+0x00;
int *GPIO2=(int *)base_addr+0x04;
int *GPIO3=(int *)base_addr+0x08;
int *GPIO4=(int *)base_addr+0x0c;
RF, Microwave, Antennas and Optics :: 02-04-2016 06:08 :: sai685 :: Replies: 3 :: Views: 374
the code is from compiler.
i know because i was once using that compiler.
delay_ms(1000); // <-------- Put a delay
Microcontrollers :: 01-30-2016 10:10 :: gamegurus :: Replies: 7 :: Views: 1155
I would like to communicate c with verilog. I find the Verilog PLI can solve my problem. I read this website to learn
But I still can't work even a printf function. I use ncverilog for verilog compiler. What I done is below. I can't have a successful compile for this. It says that it
ASIC Design Methodologies and Tools (Digital) :: 12-24-2015 08:05 :: u24c02 :: Replies: 1 :: Views: 863
volatile int a =10;
printf("good morning how are you");
I am expedting that both condition will be executed. As i have declared it volatile.
but this doesnt
Microcontrollers :: 12-10-2015 06:29 :: Arya Kumar :: Replies: 10 :: Views: 835
network interface to core?
What requirements for speed, real time, flow rate control?
Also printf("\nNot Enough Switch"); is the only line where Switch is spelled correctly.
ASIC Design Methodologies and Tools (Digital) :: 11-23-2015 13:05 :: SunnySkyguy :: Replies: 1 :: Views: 456
I'm using Keil ?Vision5 to program a STM32F407.
There's a "Software component" in Keil which allows retargeting printf to SWV window.
I've tried everything but I can't get it to work.
Can someone provide a project with printf working properly.
Thanks in advance
Microcontrollers :: 11-13-2015 22:42 :: Cruel :: Replies: 0 :: Views: 842
Ok, so suddenly printf
is not working in AVR studio, i dont know what happened, this is the code, but it doesn't output anything to the debug window:
Microcontrollers :: 10-09-2015 00:10 :: Adbadb :: Replies: 17 :: Views: 4651
Presume that printf("%f", ) rounds the float value towards zero instead towards the nearest decimal value. To correct the rounding behaviour, you'll need to add a sign dependant offset.
There's an option in ANSI C to select the rounding behviour with a float.h defined constant, but it isn't implemented in many embedded C compilers.
Microcontrollers :: 10-04-2015 11:44 :: FvM :: Replies: 2 :: Views: 521
That depends on what you are displaying and what kind of display it is.
If it uses standard 'C' functions to format the output (printf, sprintf etc...), look in the function that returns the value and change '%x' to '%d'.
Microcontrollers :: 09-15-2015 07:01 :: betwixt :: Replies: 1 :: Views: 475
hi friends i found a strange problem in dspic 33ep512mu814
if i reset the controller manually in 4 are 5th time, the if loop condition is executing that is i am getting the count constantly without the pin input if i measure the voltage on pi
Microcontrollers :: 08-14-2015 04:47 :: raman00084 :: Replies: 2 :: Views: 763