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

3
votes
1answer
514 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
44 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
191 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: ...
0
votes
0answers
27 views

How to use external clock on STM32F205VC?

I'm using VisualGDB for stm32F205VC programming. I have an external clock on my board connected to OSC_IN and OSC_OUT that I have to use. How to switch to it?
1
vote
0answers
53 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
58 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
0answers
32 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
66 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
160 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
237 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
133 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
351 views

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

Is there any way to program dsPIC33EP in C++ ??
1
vote
1answer
75 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
149 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
190 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
332 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
390 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
268 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
89 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
752 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
651 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
656 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
173 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
513 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
319 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
584 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
322 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
120 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
1k 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
840 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
2k 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
379 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
960 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
274 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
66 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
2k 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
629 views

Microcontroller Sleep Race Condition

Given a microcontroller that is running the following code: ...
4
votes
1answer
3k 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
726 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
146 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
695 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
789 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
319 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
734 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
16k 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 ...