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
0answers
23 views

Can Fez Panda II run C/C++ without RLP?

For a project I'm working on, I need to program a Fez Panda 2 to run on C or C++ in order to gain the necessary speed of reading data. However, I have been told to 'ignore RLP' as the program needs ...
0
votes
3answers
63 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 ...
2
votes
1answer
93 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 ...
4
votes
3answers
215 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
106 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
342 views

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

Is there any way to program dsPIC33EP in C++ ??
1
vote
1answer
72 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
138 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
161 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
294 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
364 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
265 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
86 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 ...
0
votes
0answers
189 views

MODBUS WRITE COIL opearation

I am trying to perform write coil operation.In below code i can read data But i could not able to performs write operation. SInce my code size is big i am pasting part of code. Give me simple example ...
2
votes
1answer
619 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
568 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 ...
1
vote
2answers
622 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
171 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
459 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 ...
0
votes
0answers
287 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
504 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
304 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
116 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: ...
2
votes
2answers
903 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
731 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
4k 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
1k 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
1answer
331 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. ...
1
vote
2answers
2k 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
875 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 ...
2
votes
0answers
1k 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 ...
0
votes
0answers
251 views

v-usb HID button press and release

I'm trying to use v-usb on an AVR to mimic a HID keyboard and I found how to send keys and how to release ALL of them, by calling usbSetInterrupt() with 0 for the key value, but is there a way to ...
1
vote
0answers
65 views

ATtiny85 + shift register + IR demodulator [duplicate]

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 controled by ...
1
vote
1answer
1k 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?
10
votes
3answers
589 views

Microcontroller Sleep Race Condition

Given a microcontroller that is running the following code: ...
4
votes
1answer
2k views

How to properly open and close files “inside” a member function? [closed]

I am using Arduino Uno and the Ethernet Shield with a 2GB SD Card. I have the following working code intended to be used to write data on the SD Card (note: the SD Library is properly initialized and ...
2
votes
5answers
158 views

Micro-Controller Programmable Selection

I have searched a lot and I can't seem to find a micro-controller that I can program in C++. Can someone please help me find a micro-controller (besides Arduino) that I can program C++?
-3
votes
1answer
643 views

Error: argument of type “cons char *” is incompatible with parameters of type “LPCWSTR” [closed]

I am writing a code in Visual C++ to access serial port of a computer. Code is given below:- ...
1
vote
2answers
1k views

Problem on printing “Ethernet.localIP()” to Serial Monitor

I am using Arduino Uno and the Ethernet Shield. I have the following code: ...
-2
votes
1answer
139 views

How Can I Program a Universal Application Keyboard? [closed]

IMPORTANT NOTE: This is a question from who has no experience and knowledge on this area. So before giving negative rep, please provide constructive suggestion. I want to program a universal ...
2
votes
1answer
650 views

Implementing the Digilent EPP

I am trying to implement Digilent Parallel Interface from their SDK. You can specifically read up on the interface in this manual. I am using the Basys 2 250k board. I am trying to figure out what I ...
-1
votes
4answers
718 views

What are the pros/cons of C and C++?

What would be the pros and cons of using C++ over C for uC (AVR) programming ?
2
votes
1answer
308 views

Control a C program on a PC with external digital/analog inputs

I developed a code in DEV C++ which simulates graphically a the actions of a train driver. Basically I control the speed and some other functions of a train from my keyboard. Now, instead of the ...
2
votes
1answer
707 views

New C++ (C++11) and embedded electronics

I wonder if the new C++ (which called C++11) works well with the embedded electronics and programming them. Do the new features fit well if working with uC? Like R-Values and so on? Or should be ...
19
votes
10answers
15k views

Programming languages for electronics engineers

I am an Electronics and Communications Engineering student, before I got to college, I have been interested in programming and computer applications. I had focused on designing Windows applications ...
3
votes
1answer
222 views

Custom-CPU builder/simulator

I googled deeply but couldn't find any cpu constructor simulator. I'm specifically hoping to learn about the operation of the northbridge, but When I googled "bridge simulator" or "bridge (the ...
2
votes
1answer
2k views

How to program an ATmega32 in C++ to control a LCD?

I'm electronics student. I'm a newbie in programming. I have loved C++ after watching some videos on C++. Am using Atmega32 uC, WinAVR GNU GCC compiler programming tool, 16*2 Hitachi HD4478OU LCD for ...
5
votes
2answers
269 views

How can I instruct my compiler to use 8 bit bytes instead of 16 bit integers?

I have the following code in my microcontroler program: ...
7
votes
1answer
253 views

While loop optimized away

I have the following code in my microcontroler program: // Wait for ADC conversion to complete while ( ( ADCSRA && _BS( ADSC ) ) == _BS( ADSC ) ) {} ...
3
votes
2answers
583 views

C++ microcontroller/processor selection

I am having trouble selecting a microcontroller/processor for a robotics project in C++. I have a program working on my computer that is 1.5+ KLOC and relies on data in twenty other files to function, ...