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
2answers
73 views

12 Hour delay for atmega16a

I am trying to turn on a LED for 5sec every 12 hours. I tried: ...
2
votes
1answer
37 views

understand the the setup of Timer on STM32f10X

I'm trying to understand how to correctly setup the timer on STM32f10x . The board is running with an external crystal of 16MHz , and I'm using the PLL : ...
1
vote
4answers
57 views

Inerfacing switch & led with any controller

I am trying to interface switch and led. I want to write a program in which if I press and release the switch led should glow and if I again press the switch led should turn off. I am not able to ...
-4
votes
1answer
71 views

From bitwise instructions to c code intuitively

I need to be able to recognize what an assembly code is doing. I can picture the basic instructions in C code in my head. But bitwise instructions such as ...
0
votes
1answer
42 views

_asm TBLRDPOSTINC _endasm,

I am using a PIC18f25K80 and an XC8 compiler. I have included the files from the MDD library. However, after compiling I get the following in the "FSIO.c" file: ...
2
votes
2answers
110 views

Timer PIC16 not working.. is it my code?

I'm new here as an OP, but I have been visiting this site for years. This time, just looking at other problems hasn't helped me. Hence, I sign up and just ask! I'm creating a countdown timer with 30 ...
0
votes
1answer
29 views

setting the frequency of a PWM on a STM32

I'm trying to write a function that get the ferquecy of PWM and can set the timer based on this value : ...
4
votes
1answer
45 views

Number of address in AT24C16 EEPROM or is it duplicate?

I am working on EEPROM AT24C16 for a particular project. According to the datasheet it must have 2048 addresses and I should be able to write 1024 unsigned int into it [ 1 unsigned int per 2 ...
0
votes
1answer
42 views

ADC neglects input voltage (ATMega32)

In the following AVR code, why do I always see the same voltage for all pins of port A? I am using ATMega32. BTW, when I am grounding some pins of port A I do not see any change in the output. It ...
0
votes
0answers
46 views

STM32f4discovery DAC DMA HAL library

I have a problem with the configuration of DAC with DMA. DAC is working but when i want to connect it with DMA it doesn't work. Here is my code: ...
1
vote
1answer
47 views

Memory Leak in queue linked list, avr c

I am building a small command interpreter to be run on a microcontroller. To queue each command and its accompanying arguments, I am using a queue implemented as a singly linked list. All of the queue ...
0
votes
1answer
28 views

Problem with IAP

I'm using LPC1788 IAP to write to Flash and I'm a little confused on what's going on. I'm trying to write 8 bytes of data to Flash memory with 2 tehniques: 1) With one which is logical to me and it ...
0
votes
0answers
15 views

Unable to access clock while interfacing AT32UC3C2512C with Flash Atmel Studio

I'm trying to interface the controller (AT32UC3C2512C) with flash using SPI protocol. The IDE that I'm using was Atmel Studio. I have written a simple code in which I'm trying to read the manufacturer ...
0
votes
1answer
58 views

SIM908 GPS STATUS “Location Unknown” Error

I'm using a SIM908 module on a custom board and am having trouble getting the GPS location from it. Everything else works on the module. I can send SMS, make calls and send and receive data from a ...
0
votes
0answers
25 views

GPS logging on the intel edison breakout board [migrated]

I'm working on my project car, and I have decided I would like to have a GPS and log some sensors too. I'm just at a bottle neck here, the sensors I have brought pull about 7v each where I can't pull ...
0
votes
0answers
62 views

msp430 AES encryption/decryption using DMA

I'm having some difficulties implementing the AES encryption primitives for an msp430fr5969 micro controller following the indications described here. more particularly the AES CBC cipher mode. My ...
0
votes
0answers
31 views

Manual SDIO command

this is my first question here on SE. I am writing a C test program in a u-boot environment (meaning Linux has not booted yet) for a custom AM335x board. The requirement is that I send a command to ...
1
vote
1answer
150 views

How should I interpret this USB packet in a human readable way?

Using a wixel (wireless transmitter/receiver with USB capability, "this "wixel" thingy is a general-purpose microcontroller board that includes, among other things, USB, 2 UART's, and a 2.4GHz ...
1
vote
0answers
57 views

When C++ replaces C? [duplicate]

In which cases is C++ necessary when we are programming microcontrollers, what are the situations when C++ replaces C language? Just give some examples. I'm asking this because I want to start ...
0
votes
1answer
43 views

Input Pins having voltages (5V)

I am currently working on a microcontroller based system, the issue i am facing is that my inputs pins 40 and 39 of atmega32 are somehow getting internally high, Pin40 shows 2.5 volts and Pin39 shows ...
0
votes
4answers
87 views

How to get started with microcontrollers? [closed]

My point is not to start a flame war, or have an opinion based fight. I really just need advice based off of my experience. I am pretty experienced with using an arduino, I understand C, & C++ ...
0
votes
2answers
41 views

Does each I2C START signal need to be closed by a STOP signal?

Could two I2C START signals be sent one after another without a STOP signal sent in between? Below is an example of bit banging, where there is not STOP between the first and second START: ...
-3
votes
2answers
68 views

Mixing Assembly and C [closed]

Is it possible to use a mix of these 2? Using a pic4550 and mplabc18 Lets say i have a microcontroller, that in my port B (B0 B1 B2 B3 B4 B5 B6 B7) 1 Byte, I set it to a '00000001' Is it possible ...
0
votes
2answers
176 views

USB Printer not sending Endpoints

I am working on ARM & based LPC2468 controller interfacing with USB printer.I have successfully configured a Printer and it is working Properly. Now i came across a new printer Manufactured by ...
1
vote
1answer
257 views
0
votes
2answers
64 views

How to get up to 24 I/O pins from the PIC4550

Im trying to implement and understand the CRC by making a circuit, by using 1 byte (8 bits), and a highest power of the polynomial of four, these 2 values should be XORed until i get a final output, ...
2
votes
1answer
95 views

PIC Microchip Keeps Resetting

I have a PIC16LF1709 20-pin 8-bit microchip MCU. I am programming it using a PICkit 3. I am able to successfully burn a program to the chip and run it, but it always seems to reset part-way through ...
0
votes
1answer
57 views

AVR global variable modified by interrupt not persistant

Using an ATmega328p, I'm running into a problem when I make an interrupt (INT0 or INT1) active, the code will execute just fine (MusicOnLed and FadeOnLed functions will execute), however as soon as I ...
1
vote
3answers
465 views

Realloc wasting lots of space in my MCU?

I am writing a simple task scheduler and using dynamic memory allocation on my cc430F5137. I agree that it is not a good practice but for the time being lets assume it is my application requirement to ...
0
votes
2answers
124 views

How to Write ISR function for Hardware and Software Interrupt

Till now I used Vendor(Controller Vendor) ISR for handling the Interrupt. But I want to know how to write the ISR. I know about the Vector Table. Will take one simple example for GPIO Interrupt for ...
-1
votes
1answer
99 views

What is Virtual Memory and Virtual Address space

I am not able to get, what is virtual Memory and Virtual Address space. In which situation it will be used. I have referred wiki page, but I couldn't able to get it. Can any one give one simple ...
0
votes
1answer
39 views

Events in FreeRTOS 7.1.1

I'm looking for method how to inform one task in firmware about change somewhere else (Using FreeRTOS 7.1.1). I need to receive information about changes, but I wouldn't want check value in cycle - ...
0
votes
1answer
66 views

Atmega2560 Usart Interrupt problem

When I send any data from serial port, RX pins are flashing but ISR is not running. Here is my code. ...
2
votes
1answer
65 views

Using XMEGA timer

I want to use the timer in XMEGA to know how long it takes for a function to be done: ...
4
votes
2answers
190 views

Interrupt fails to change variable, how so?

Problem was virtually undebuggable, the interrupt that was changing a variable would randomly fail to do so, with no apparent pattern; within interrupt code variable would change but outside of it the ...
0
votes
0answers
28 views

Ethernet example software for Olimex STM32-P107 Dev Board?

I am programming an STM32F107VCT ARM in C, but unfortunately I find no software example projects for ethernet that are designed for Keil uVision. Everything I find is for the IAR EW. Thanks in advance ...
0
votes
1answer
40 views

Flash memory read and write

I'm always disabling interrupts while writing to some sectors on Flash, but does Flash memory requires disabled interrupts even when you just want to read from it? Why yes and why not? Thanks for the ...
0
votes
0answers
40 views

PWM output pulse variation is not showing in proteus

I want to generate the pulse based on analog input giving to ADC and convert ADC value to PWM signal using LPC2138 ARM processor. I am able to dubug in Keil software in which it works perfectly as I ...
1
vote
1answer
111 views

My For loop isn't exiting and I don't know why

I'm programming an ATMEGA328p on a breadboard and using an arduino board to do the USB to Serial conversion. Part of some code I'm writing involves a for loop that is being used to take the 8 bit ...
0
votes
1answer
67 views

LED can't stop blinking (AVR-C)

So here is the basis of my code, I have an array of different instructions for the prescribed LEDs to follow. The led will blink for the prescribed number of times in an interrupt before they stop ...
0
votes
2answers
51 views

SDXC Card Reader with LPC1822

in my application I have an SD Card reader using the NXP LPC1822 microcontroller. It works very good with all SD- and SDHC-Cards I've tested so far. Only thing that does not work is SDXC. I already ...
0
votes
0answers
13 views

IAP Flash LPC1788

Can this line cause a problem when reading from Flash, because of casting to BYTE pointer instead of DWORD? What will happen, and what data will be read? pointer_podatak = (BYTE*) IAP_BASE; ...
2
votes
1answer
41 views

XC8 Interrupt function qualifier

Referring to the XC8 user manual, DS50002053E, section 2.5.10.3 the following is stated: For 8-bit compilers, change any occurrence of the interrupt qualifier e.g., from: ...
1
vote
1answer
45 views

Writing to and reading data from Flash using IAP

Here you can see functions I'm using to store data into Flash, but I'm getting data erased after power reset, so it's still in RAM not in Flash. ...
1
vote
0answers
30 views

Difference between sectors used for Flash and IAP?

Here is a picture of sectors on on-chip 512kb Flash memory on LPC 1788, and the question is what's the difference between sectors 0 to 19 and 20 to 29. Can 0 to 19 be used in IAP or not and ...
0
votes
1answer
46 views

Interrupt on the XMEGA

I have 3 buttons connected to PIN1, PIN3, PIN5 of PORTA of an XMEGA. If pushed they deliver a falling edge. I'm try to generate interrupt using those buttons, I started with one, here is what I ...
1
vote
1answer
40 views

PIC - Accessing udata through pointer in another file

So I have a list of clockings in my udata in, let's say, clock.c. I have read that udata has to be accessed through a pointer, well okay, fair enough. Above ...
0
votes
1answer
100 views

Sending info from python to avr-c

okay so my situation is that i am working an avr chip which is the atmega 328p and what i want to do is i want to lets say have a user input in python lets say the user types in a string and from ...
0
votes
3answers
124 views

How to send string in serial communication in AVR-C

So as the title states, instead of sending a byte of information at a time, I would like to be able to send a whole string. What I tried to do was that I tried to put the user input in an array and ...
1
vote
3answers
69 views

Queues in FreeRTOS

I have multiple tasks that all write to a screen. Obviously without controlling who can write to the screen when I'll have problems. I thought the easiest way to do this was with queueing. I have a ...