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

-5
votes
0answers
64 views
0
votes
2answers
34 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
46 views

Mixing Assembly and C [on hold]

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
0answers
70 views
+100

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
252 views
0
votes
2answers
59 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
84 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
31 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
442 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 ...
-1
votes
0answers
26 views

Linker Error:could not find definition of symbol '__BARGB0' in file [closed]

I'm getting this error while running my program FOR PIC18F452 on MPLAB . Can you help me out
0
votes
2answers
108 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 ...
0
votes
1answer
68 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
35 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
44 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
45 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
184 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
15 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
30 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
17 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
104 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
64 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
40 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
12 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
30 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
29 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
25 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
33 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
34 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
83 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
61 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
52 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 ...
-1
votes
1answer
71 views

Parsing GPS data? [closed]

I wrote a code to simulate receiving NMEA string from my GPS, but faced a problem in parsing the latitude, longitude and date, i want to know what is the problem with the code . here is my code : ...
-3
votes
2answers
36 views

From timer interrupt to the rerun of main function (PIC16f877)

I'm working on a basic project for a security system with PIC16f877 in MikroC, and I had a problem concerning the timer interrupt. I want the interruption to be cancelled when a chosen amount of time ...
0
votes
1answer
134 views

How can I set up SPI using Atmel Studio and C code for ARM processor?

I am trying to program the SAM3x8E chip on the Arduino Due through Atmel Studio. I would like to be able to control a digital resistor over the SPI interface with the SAM3 chip. I am running Atmel ...
0
votes
1answer
27 views

Check the value of FSL_M_Control in the MicroBlaze

I wrote a hardware accelerator which communicates with a MicroBlaze over FSL. In the Microblaze C code I would like to use putfsl() in a loop until the hardware ...
3
votes
1answer
528 views

Implement cryptography algorithms in an ARM microcontroller

Assume a situation in which you want do some encryption procedures in your ARM microcontroller. (Receive a file, encrypt with 3DES and some hash functions and returning it, for example.) As far as I ...
0
votes
0answers
12 views

switching between CCP capable ports

I am using PIC16f1788 it has 4 CCP ports two of them share the same CCP registers. I tried to switch between the ports using the following command : ...
2
votes
3answers
88 views

Interrupt question ARM?

I often see something like this void UART2_IRQHandler(void) __irq, and I wonder why __irq is used when declaring interrupt handler, is it required or handler can ...
0
votes
1answer
73 views

UART Interrupt won't work

I have a problem when trying to test send and receive lines on RS485 communication, anyone know what may cause a problem here? It works without interrupt but with interrupt won't work. I am working on ...
1
vote
3answers
80 views

Function to determine data size [closed]

I am using eeprom emulator which writes a page of flash of 60 bytes at once. Data to be written to that page is first stored in a 60 byte buffer (array of 60 elements) in ram and then transferred to ...
1
vote
2answers
50 views

getting the right frequency on XMEGA

I've wrote a small program that runs on an XMEGA : ...
0
votes
0answers
95 views

How to test RS485 communication via PC terminal?

I've tested RS232 communication via terminal with LPC1788 ARM CPU, and it works, now I want to test RS485. I just want to make simple echo program, what is sent, that is returned. Problem is that CTS ...
2
votes
1answer
66 views

ELF section flags not picking up flags from linker script

In my linker script for binaries on an MSP430, I have a memory section marked "rx": ...
0
votes
1answer
76 views

Stop timer set new value and start again AVR (Interrupt)

I have AVR MCU. I am playing with timer now. What I need ? I have timer counting up with some frequency. In each interrupt I am incrementing variable, and somewhere I need to check value of this ...
1
vote
3answers
280 views

Kp, Ki, Kd for software PID control

I am designing a software PID control. Logic is almost final but I wonder how do I decide the value of \$k_p\$, \$k_i\$ and \$k_d\$. Also, I need to determine the max and min value for the Pterm Item ...
1
vote
3answers
94 views

ADC value conversion

I am getting full scale ADC value from 0 to 16348. I am trying to convert it to 4-20mA and then to 0-25 bar pressure, as I am ultimately measuring pressure. I am ...
0
votes
1answer
87 views

Measure frequency of a square wave using capture module

I wrote the following code to measure the frequency of a square wave using the capture module of the PIC16f1788. I wrote the code by following step by step what is required in the datasheet of this ...
0
votes
1answer
55 views

C Header with bits names for LPC1768

I'm starting with ARM and I program in C for LPC1768. I included "LPC17xx.h". It gives registers names in C. But where are the names of bits? For instance: I want to use UART. So first step: "In the ...
0
votes
1answer
58 views

Functions that return Enums?

In Atmel ASF I found this piece of code ...
0
votes
0answers
82 views

How to use printf(), scanf(), gets() etc with *both* USART's?

I'm using a PIC18F26K22. It has two USARTS. The compiler provides a printf() function, and the user provides the underlying getch() and putch() functions. However, using Microchip Code Configurator, ...