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
20 views

Reading C++ data on matlab

For my final yr project I want to create an oscilloscope using a fpga and ADC.hardware part is almost done and my unit can sample and send samples thru USB to read as decimal integers. Currently C++ ...
0
votes
1answer
82 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
0answers
15 views

Beaglebone Black running Debian, does device tree overlay act as an api? [migrated]

This maybe more of a Linux specific question but... I've been reading many tutorials and it seems that you can use JavaScript, Python, and C++ to write code for the Beaglebone Black(BBB). It looks ...
0
votes
1answer
71 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
98 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
207 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
253 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
74 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
116 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
238 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
286 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
450 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
147 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
229 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
130 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
358 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
259 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
108 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
527 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
431 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
2k 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
911 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
246 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
1k 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
590 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
184 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
875 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
501 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
154 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
453 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
690 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
129 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 ...
1
vote
1answer
498 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
500 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
271 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
626 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 ...
18
votes
10answers
10k 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
206 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
252 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
233 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
529 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, ...
1
vote
2answers
9k views

How to have an Arduino wait until it receives data over serial?

So I've wired up a little robot with a sound shield and some sensors. I'm trying to write a sketch that will let check the sensors. What I'd like for it to do is print out a little menu over serial, ...
8
votes
1answer
1k views

Can an ATmega or ATtiny device signature be read while running?

While programming an ATtiny or ATmega, avrdude prints the device signature, in this example it is an ATtiny. avrdude: Device signature = 0x1e910a Can I read this ...
5
votes
5answers
3k views

Is it going to be possible to write code in C++ for PIC microcontrollers in the future?

Is it ever gonna be possible to use C++ for coding PICs? Is there any hardware limitations that prevents us to use C++? How much the size of generated .hex file and running time of the program ...
2
votes
1answer
2k views

What's wrong with my C++ Template code for Arduino?

I'm trying to implement a C++ templated member function in Arduino 0022, but I'm getting an error in code which seems correct to me. ...
11
votes
1answer
3k views

Arduino and Interrupts: Fast way to get pin values

I use an Arduino Uno and already set it up to work with interrupts on digital pins 2, 3, 4 and 5 according to an explanation1 I found. void setup() contains the ...