C++ is a compiled general-purpose programming language that adds object-oriented features and other enhancements to the C language, which it is largely a superset of. It is popular for both embedded and PC software development.

learn more… | top users | synonyms

0
votes
2answers
108 views

Attiny85, reading analog values from PIN3, reports 654 on idle?

At first, I am not a hardware professional (starter) so be kind please. I try to reuse a DENON operation board of a DVD-player with 9 buttons with a Attiny85 Digispark clone connected to PIN3 (see ...
0
votes
1answer
61 views

The process of implementing a discrete model in C++/Arduino

I have developed an embedded electronics system centered around the Arduino Due. In my application, I am controlling the force of the end effector of a rigid object using a DC motor. The feedback ...
1
vote
4answers
245 views

What features of C++ lead to extra resource usage that I should be aware of when developing for an embedded system?

Some features of C++ have implied run-time cost or can lead to significant code size increases. Which features should I consider avoiding when developing for a bare-metal resource constrained ...
0
votes
0answers
45 views

How do I send continuous data over UART (Xilinx Zynq 7000)?

I want to interface with MATLAB to read out some sensor data which I acquire on my Xilinx Zynq SoC. For that I want to use UART which will send data during idle. I wrote this really simple routine ...
0
votes
1answer
32 views

Can't use util/delay.h on c++ in Avrstudio v6

I'm just new with microcontrollers and I'm hoping someone could help me understand this. I'm using an AVRStudio 6 and an AVRDragon. Watched some tutorials on basic programming. Here's the code: <...
1
vote
0answers
121 views

Receiving and decoding Manchester code X10

Solved: After much debugging I found out that it was the UART that was not working correctly (not sure why yet) and that port I used to turn on LEDs did not work (PORTC). So there were never any ...
-2
votes
2answers
107 views

Understanding c code of microcontroller

I am trying to build an automatic plant watering system using ATmega16. The following is the code fragment we used: ...
0
votes
1answer
202 views

RTOS: Micrium uCOS vs Mentor Graphics Nucleus

We're working on a wearable IoT device, and I'm hoping for some guidance on the common commercially available RTOS, such as what's the difference between the two. As of current I'm leaning toward ...
4
votes
1answer
329 views

How to enable c++11 support for Atmel Studio?

I am currently using Atmel Studio 7 and I need to enable c++11 support for it. I couldn't find any documentation about this topic. Moreover, I am not even sure it has c++11 support, yet.
0
votes
1answer
240 views

C or C++ for EE [closed]

I am a freshman EE student looking to have an emphasis in computer engineering. I do not start my core engineering classes till next year. However, I am wanting to get a jump on learning a "close to ...
0
votes
1answer
327 views

Exporting Mbed code to build with in Eclipse

I am working on a project to move from the mbed platform, to some custom hardware. I am using the nRF51822 from Nordic. I have just exported my nRF51-DK project to ...
1
vote
1answer
299 views

How to program USB RFID reader/writer module?

I bought an USB RFID reader/writer module from local store, it is not well known and branded, It connect to computer with USB port , and i want to write a program for it in Linux Ubuntu. I find out (...
0
votes
2answers
834 views

Embedded Systems Programming using Java [closed]

Is Java good-to-learn-next language for an embedded software engineer who mainly develops firmwares and drivers? If not so useful, why? Which language is more for that purpose, C++ or Java? I read on ...
1
vote
1answer
294 views
2
votes
1answer
159 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 ...
4
votes
1answer
895 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
3answers
91 views

Will XORing the FIO0PIN register on an LPC175x6x give unexpected results?

Is this code guaranteed to only effect pin 22? int* FIO0PIN = (int*)0x2009C014; *FIO0PIN ^= (1<<22); At first it seems like a dumb question but I remember ...
1
vote
2answers
202 views

When looped, memory address not being displayed sequentially while skipping intermediate memory

I am trying to run through a sequence of memory and display it on the command window. Here is the code: ...
1
vote
0answers
114 views

STM32 F205VCT6: GPIO B Port 6 and 7 do not work?

I'm using the STM32 F205VCT6. I have a simple blinking LED program written in C++ with VisualGDB (and VS 2013 Community). It works fine for pins like A1 and E2, but it doesn't for B6 and B7, where I ...
1
vote
0answers
128 views

Designing implementation-inspecific PIC32MZ communication classes in C++

Alright everyone, that title may seem like a significant amount of technobabble, so let me explain what I'm trying to do. I'm starting to break into the PIC32 family, specifically the PIC32MZ series, ...
0
votes
3answers
91 views

Code advice with minimum clock cycles

My original question was: I've a 8 bit data with only 3 bit used, for example: 0110 0001 Where 0 indicate unused bit that are always set to 0 and 1 indicate bits that change. I ...
3
votes
1answer
752 views

What benefits are there to programming an MSP430 in C/C++ over Energia?

I'll start by saying I'm new to micro-controller programming. I've had some (ca. 30 years) experience programming, and some of that was writing C/C++ but those days are long behind me now. Since I'm ...
5
votes
3answers
428 views

C++ in Embedded Electronics - Literature [closed]

Recently, we've been discussing the use of C++ in (small) embedded systems. As all examples from controller vendors I have seen in the past are tailored to the use of C this is basically what we've ...
1
vote
1answer
307 views

Compiling C++ on EFM32 microcontrollers

I would like to use some high-level libraries written in C++ for my EFM32 microcontroller. Unfortunately the Simplicity Studio IDE for the EFM32 does not seem to support C++. I am a bit confused ...
2
votes
1answer
380 views

Is there any way to program dsPIC33EP in C++?

Is there any way to program dsPIC33EP in C++ ??
1
vote
1answer
90 views

Compilers for STM32F303x [closed]

Does anyone have any suggestions for C/C++ compiler/debugger for this chip, initially via ST-LINK on a Discovery board? I am currently using IAR EWARM but am not particularly happy with it.
-1
votes
1answer
244 views

How to make a Calculator? [closed]

I am new to electronics programming. I am currently using C#. Can you please tell me how to programme a Calculator, what programming language should I use? Can I use C/C++? And what components ...
0
votes
1answer
311 views

Using LPCXpresso 1114, I am unable to call a function in a C++ file from a C file

I am having a similar problem to the one described in this post: Why isn't my SysTick_Handler() being called in my LPCxpresso C++ Project? I have a couple of .cpp files, but the rest are .c ...
1
vote
1answer
616 views

How to connect with and use a USART to USB converter (CP2102 by Silabs)?

I figured since this is a very specific problem with a hardware device that many on SuperUser might not be familiar with, I would try posting here. I searched around on the net a bit and found a ...
1
vote
2answers
693 views

PIC programming - Get value of multiple buttons to a port

I'm learning PIC (pic18f4550) and pretty new to microcontroller programming. I'm trying get value of three button on PORTA and send it to a 8x8 led matrix as X coordinates through a 74LS595. The ...
1
vote
1answer
282 views

Adding one to a value in C++ for a PIC Micro

I have a PIC 12f629 and I am going to program it. I have a value for the output: GPIO = 0b000000; and am using it in a loop that iterates 10 times: ...
0
votes
1answer
106 views

Designing a simple energy-efficient communication protocol?

What is the required background knowledge in order to be able to understand and work on the design of a communication protocol which has to be robust, simple and capable of coping with short contact ...
2
votes
1answer
1k views

Problem using DS1337 - RTC

I am trying to use a edited version of the library given at this link. I basically changed some of the included file and some of the changed function of the wire.h library. Though I am not a hardcore ...
5
votes
3answers
1k views

Reading a multibyte volatile variable that is updated in an ISR

Consider the Arduino code at the end of this post for full reference that makes LED13 blink in a 0.5Hz rhythm driven by timers. It is just a proof of concept, I know it can be improved for various ...
2
votes
2answers
924 views

Sending data from PC to micro-controller

In my Graduation project I need to send data from computer to microcontroller to control the position of a stepper motor Most of the examples I have seen use the legacy parallel port. unfortunately ...
3
votes
0answers
223 views

Using C++ in resource constrained environments [closed]

In the past I've been using C (or ASM) to develop microcontroller firmware. It's what I learned during my EE studies. It seems though, that the job market here has a high demand for C++ developers in ...
3
votes
1answer
920 views

ATtiny45 Timer1 clock misconfiguration

I am overlooking something with a very simple program for my ATtiny45. A program that divides the 16MHz system clock by 16 and outputs that on pin 5 (OC0A) using Timer0 and on pin 6 (OC1A) using ...
1
vote
0answers
569 views

Should I inherit from Arduino's Stream or Print when I'm using write?

I'm submitting a pull request to an Arduino library and want to make sure I'm doing the right thing before I send it. The change allows the dumping of data somewhere other than into a string buffer (...
1
vote
1answer
773 views

Combination of the CODE data receive from LTC2498 via SPI with the radio link between two ATmega128RFA1

I would be very grateful for your tips for my present problem definition: I have a microcontroller ATmega128RFA1 with integrated Zigbee with UART-USB(TTL Converter) attached to the PC. I have a ...
4
votes
2answers
549 views

What concepts in programming are useful in Electronics Engineering? [closed]

I am studying Electronics Engineering. I only took two 3 programming courses. The first 2 are in c++ and I learnt up till pointers, classes and the basics of data structures. The third is mips ...
1
vote
1answer
135 views

How to change PORTx register in other place of program?(Codevision & AVR-GCC)

I have a question related to AVR microcontrollers using AVR-GCC and CodeVision: Normally we set the port related registers inside the main function using DDRx/PORTx registers, for example like this: <...
3
votes
2answers
2k views

Memory management problems with ATTiny85

The setup is as follows: I have a little program to drive single color 8x8 led matrix using 595 shift registers that are supplied with data by ATTiny85 through USI as SPI Master. I upload program to ...
2
votes
2answers
2k views

Interface-like definition in Arduino?

I'm writing a new Arduino project that uses an 16x2 LCD Crystal Display with a KeyShield. I would like to construct a menu structure in which the user can navigate using the buttons. I'm new to ...
3
votes
2answers
6k views

Parallel port output in C++ on Win7 x64

First of all, I have searched the internet all day long, including here on stackexchange, and couldn't find a clear solution. Only ambiguous answers and dead links. Let's start with what I have: my ...
3
votes
2answers
3k views

Use PWM and ISR at same time on AVR

Is it possible to use AVR PWM outputs and ISR interrupts at the same time? I've got a project I'm trying to do on an ATMega328P and I need 3 PWM outputs but ALSO need to be able to use ISR interrupts ...
1
vote
2answers
607 views

Using STL with ARM microcontrollers

I have an NXP LPC1769 which features an ARM Cortex M3. I understand how to program it and have had success building both C and C++ programs for it. I have some code that I want to port from Windows. ...
2
votes
2answers
5k views

C++ Standard Library on Arduino [closed]

Why can't I use std::string or any other objects from the C++ Standard Library in my sketches for Arduino? ...
3
votes
2answers
1k views

Understanding volatile class fields in AVR C++ programs

I'm having some confusion about what members to declare volatile in a program I'm writing in C++ for an AVR microcontroller, with interrupts. When it's plain C it makes sense - the compiler doesn't ...
5
votes
0answers
2k views

ATTiny 85 + shift register + ir sensor

I had the ATtiny working with the shift register, but when I added the IR receiver to the code the shift register did not work as desired. I have a shift register connected to 8 LEDs and controlled ...
2
votes
1answer
3k views

AVR Time Delay without Arduino Libraries

Trying to figure out how to do something like delay() in Arduino but just for straight AVR code. What's the typical way to do waits and such on AVR chips?