C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C ...

learn more… | top users | synonyms

-2
votes
0answers
58 views

Run Arduino with battery [on hold]

I'm doing a program to calculate velocity and distance using accelerometer. I already completed the program. I want to carry the board around using battery to run the board. I would like to set a ...
1
vote
1answer
66 views

PIC12LF1552 I2C; uC won't exit Start Condition

So I've been tackling this problem with integrating I2C functionality into my code, which is documented here on StackOverflow: ...
1
vote
2answers
43 views

How to stabilize adc output display on 7 segment

I am designing a simple voltmeter. I am using 8 bit ADC of PIC16F72 and Mikro C compiler with a multiplexed 7 segment display. I am getting ADC value on 7 segment display but its continuously ...
0
votes
1answer
29 views

ELAN EM78P156NP microcntroller programming

I am writing program for ELAN EM78P156NP using WisePlus C Compiler ,but my program is not responding when written on micro controller.I am putting the code below please let me know what is wrong with ...
0
votes
2answers
62 views

Which is better after rewriting the ROM on a PIC16F? A software reset instruction or a watchdog reset

I am working on a project where the uP can be calibrate at any time. The new calibrated values are stored in the uPs ROM. After the calibration is complete, I have to reset the uP such that the ...
0
votes
0answers
50 views

Storing and retrieving Real time from the RTC

Im working on the Intel Galileo board and my aim is to display both the current time and temperature every second on the serial monitor . However each time the USB get disconnected from the PC and ...
2
votes
2answers
73 views

Displaying a custom character on 2x16 LCD

I have written a working LCD driver for a NHD‐0212WH‐ATGH‐JT and I would like to add the possibility to create your own custom characters. Through some research I understood that I need to write a ...
0
votes
0answers
24 views

Send multiple data to Xively client

This is my first time using GSM shield send data to Xively client. I have read through the example from Arduino tutorial and merge the code together with mine. I managed to send one data over to ...
0
votes
1answer
61 views

Microchip PIC32 MEB Audio Recording

Well, I was just wondering, I have been using the Microchip PIC32 USB Starter Kit with the MEB (Multimedia Expantion Board 1) for some projects. One of them is to record audio and analyse it, the ...
0
votes
0answers
7 views

Knowing the Arduino memory capacity [migrated]

I am using Arduino uno. My data is storing into EEPROM whenever i run my program, it will store multiple data depend on the loop. For my program it calculate 10 sample in 0.1 sec, so 100 sample in 1 ...
0
votes
1answer
66 views

Using CooCox as an alternative to Keil MDK-ARM - any limitations?

A very popular and advertised tool for programming ARM microcontrollers is Keil MDK-ARM. The evaluation version can be downloaded here. However there is a code-size limitation of 32kb for using the ...
1
vote
3answers
92 views

How can I make a latch in AVR without interrupts?

I want to make a simple circuit that when you press a pushbutton, an LED lights up stays lit until the button is pressed again. I haven't delved into interrupts yet on AVR, and was wondering whether ...
1
vote
1answer
95 views

Arduino EEPROM store multiple data

I just need a small help to completed my project. As my output is printing 2 result but only 1 output is saving to the eeprom. How can I save multiple data into eeprom? I'm just showing the setup and ...
0
votes
1answer
52 views

STM32F4xx input pin reads wrong state on first run but not subsequent

I am working on a program which reads the state of a pin at startup to determine an operational mode. When I run the code on first power up, it reads incorrectly, but subsequent resets without power ...
1
vote
1answer
60 views

C Documentation for AVR Atmel Studio

I am new to AVR programming and have tried couple of tests on assembly language and were successful. However, I would like to try out programming in C with ...
0
votes
1answer
75 views

Flash Mem. Read/Write

Using SerialPort communication between PC and MSP430F5438A. It's C# on the PC side and Code Composer Studio (CCS) on the MSP430 side. I'm sending "Hello World!" to MCU. I set the flash pointer to ...
1
vote
1answer
110 views

Regarding Microchip XC8 compiler's registers and bits definitions

I'm going to take a random 8-bit Microchip microcontroller: PIC16F887. Let's have a look at how the XC8 compiler (and the HI-TECH PICC, for that matter) is defining a register (SFR) and its ...
0
votes
2answers
78 views

Arithmetic Overflow ATmega328

I have written the following function to calculate the current timestamp (since 00h Jan 1 1900). The output I get is: ...
0
votes
1answer
103 views

What are these pulses?

To continue of this question... I figured out the main problem and now I have an odd problem. at first, let me to put the codes. "Main.c": ...
0
votes
1answer
60 views

How to ensure serial transmission and reception of required data without any garbage values in the 8051?

I'm trying to continuously transmit the character 'L' from the microcontroller 8051 to the PC at a baud rate of 9600. The frequency of the 8051 is 16 MHz, and I accordingly loaded the BRL register ...
3
votes
1answer
60 views

AVR - ATmega16 - Timer config

Trying to figure out the timer setup in Atmel Studio 6 for an ATmega16 microcontroller. And I just don't get it. I am trying to create a TickCount similar to GetTickCount() Retrieves the number of ...
0
votes
3answers
123 views

Run program directly with MPLAB X(PIC16F628A)

I want to blink LED with PIC16F628A and run it directly with the button make and program device main project of MPLAB X. to programing the PIC I did simple wiring ...
1
vote
1answer
195 views

How to intitalize data in Program Memory

Im using MPLAB IDE & C18 compiler to program Pic18f2550. I have to initialize a const string in program memory to save space in RAM how do I do it ?
1
vote
1answer
52 views

Is the output clock correct?

I have written and using a STM32F030F4 for toggle a pin. I configured all things and my program is this (I use GPIOA->ODR ^= GPIO_PIN_2 for toggle GPIOA2 in ...
0
votes
0answers
39 views

UART PIC18F8722

I'm trying to connect a bluetooth module (the baudrate is 9600) with a PIC18F8722. The connection is with UART and I programmed this: ...
0
votes
3answers
78 views

How to do a specific task after some time

I have to switch on one relay after some specific time, but at same time I have to do continuous polling for controlling other relays, I am already using interrupt for multiplexing purpose (7 segment ...
0
votes
1answer
33 views

How to Prevent continuous switching fluctuation?

I am designing a digital stabilizer ,I am using ADC feature of Micro controller to sense incoming voltage and processing output through an AUTO Transformer .The code is like ...
0
votes
1answer
85 views

Displaying different Data on 7 segment

I am Designing a Digital Stabilizer ,where I have to Use a Multiplexed 7 segment Display to Show Input Voltage & Output Voltage ,I have successfully able to see input voltage but I am unable to ...
1
vote
1answer
61 views

C Programming for 8051: SFR directions as arguments

I'm currently making a very simple Tic-Tac-Toe game with an AT89C51RC2 and I am having issues getting the button input right. Basically, the input is a 3x3 Button Matrix which I want to utilize by ...
3
votes
2answers
221 views

SPI1 doesn't work

I'm working on a simple project. I want to send a string. the string is "Rohalamin". the second board after recieve the string should turn on the LED. the program for first board is (the MCU for ...
1
vote
1answer
83 views

USART communication problem on PIC18F6722

I am trying to use enable USART communication on a PIC18F6722 microcontroller. More specifically enable the receiver and attach a receive interrupt to it. The datasheet describes the relevant bits ...
3
votes
2answers
126 views

Where is the C API reference for the MSP430? CCS version

I see a lot of sample code and tutorials, but where is it documented that symbols (defines) such as P1OUT and P1DIR are ...
2
votes
1answer
78 views

PIC12 TRIS Register not setting, No GP0 GP2 output

I originally asked the this question on Stack Overflow. I think here would have been a better audience. I'm trying to program a PIC12C508A to do a simple LED learning circuit. I've read some ...
6
votes
1answer
730 views

Are pointers treated differently in AVR compared to say x86?

Microcontroller: ATtiny13 IDE: Atmel Studio I'm trying to write a Hello World application by writing high to port PB4. This works fine: ...
1
vote
2answers
146 views

Executing code at diferent speeds, using one timer, and no extra RAM

I was wondering, will this actualy work? (when timer / prescaler set) It saves RAM by not using extra variables. Are the better ways of doing this? ...
0
votes
1answer
53 views

Avoding repeated queries while working in a WSN set-up of Coordinator-->Repeater-->End Device , when Coordinator and End device are in Range

I am working on a WSN set-up. I posted a question earlier on the same. I had a another question with respect to the same. My question is while working in broadcast mode, if Coordinator and end ...
1
vote
2answers
150 views

Problem with USART programming

I have got a problem with an USART module I wrote in C for PIC12F1822, related to USART transmission. Everything happens to be fine when I debug in MPLAB with PICKIT3 (TXREG changes value and every ...
0
votes
3answers
100 views

Tools to compile pointers to arrays of static size

Are there any static code analyzing tools for C that convert pointers to arrays of a static size? It is a marginal pain and I just figured I'd check with the community. A quick google search did not ...
1
vote
1answer
65 views

AVR USART Not Receiving

I have connected my AVR USART to file stream so as to make it easy to send formatted strings on ATmega8 From the AVR, I can send(TX) just fine. However, I am not receiving anything. Can't put my hand ...
0
votes
0answers
31 views

Reading an irregularly shaped matrix and doing action when a key is pressed in a modular way

Before I get into the details, I'd like to apologize if this is the wrong SE site for this. I could see it going on here, Stackoverflow, Arduino, or maybe even code review. I am using a Teensy 2 as a ...
1
vote
1answer
70 views

TCP bootloader memory issue

I am trying to write a simple, stand-alone TCP bootloader for an AVR micro-controller. Right now, I have got a collection of APN that weigh almost 14KB memory. The application code will establish a ...
-1
votes
1answer
60 views

Need Help to debug the program for pic 16f877a

I am a starter in PIC and I have done a program in pic c compiler for the following problem When PIC A0 receives an input of more than 4 v, it is converted into digital output and that is fed to a ...
2
votes
2answers
113 views

Program memory question (working dispite insufficient memory)

I am writing this program to a Microchip PIC. ...
2
votes
1answer
120 views

MSP430 printf function executes too slow

I try to use Sky mote (MSP430 F1611 + CC2420) to read the data from I2C sensor with 100Hz sampling frequency and write the data to serial port (USB). I tried a couple of tests and realized that the ...
2
votes
2answers
268 views

Tiny Code for dumping Flash Memory

I'm trying to write as tiny code as possible to extract the firmware of Infineon's XMC4500 microcontroller. The code must fit into a 30 byte buffer which allows me to have 15 machine instructions ...
3
votes
3answers
168 views

What happens when you fall off the end of main() in a PIC? [duplicate]

Another question included this program: void main(void){ TRISD = 0x00; PORTD = 0xFF; } Let us assume that it does exactly what was intended up through ...
5
votes
3answers
98 views

Dump Flash Memory through a single GPIO pin

I'm working with Infineon's XMC4500 Relax Kit and I'm trying to extract the firmware through a single GPIO pin. My very naive idea is to dump one bit at a time through the GPIO pin and somehow ...
3
votes
1answer
119 views

Writing the bootloader program into ATmega32A

I am in a need of programming a bootloader code written in C into the boot section of AVR ATmega32A using a serial programmer. I can't write the code directly into the boot section from Atmel studio. ...
2
votes
1answer
627 views

Writing bootloader for STM32 by C language in Keil

I want to write a bootloader for my MCU. It's an STM32F103RET6. I searched for information about writing a bootloader for it, but I couldn't find anything. Now I have these questions: Where can I ...