Questions tagged [programming]

Questions about programming parts (FPGAs, Flash, etc.) Many software programming questions should be asked instead on Stack Overflow.

Filter by
Sorted by
Tagged with
166
votes
16answers
81k views

Is C++ suitable for embedded systems?

A common question, here and elsewhere. Is C++ suitable for embedded systems? Microcontrollers? RTOSes? Toasters? Embedded PCs? Is OOP useful on microcontrollers? Does C++ remove the programmer too ...
12
votes
5answers
17k views

LTSpice Automation

I have a battery-powered boost converter and I'm attempting to measure the maximum input (battery) voltage droop under various load conditions of high current draws (different duty-cycles/...
10
votes
4answers
1k views

ICSP or Pre-Programmed Microcontroller

I've designed a PCB for small scale production; currently I'm hand soldering them in batches of 20 at a time. This PCB uses an ATMEGA168 microcontroller which I program before soldering to the board - ...
8
votes
7answers
60k views

STM32 & ST-LINK - Cannot connect to MCU after successful programming

I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU. I use ST-Link Utility from ST ...
5
votes
3answers
4k views

Will my HEX file fit in my microcontroller?

I have a hex file with a size of 42 kB. Does the size matter while loading it in a microcontroller? Can I load 42 kB hex file in a ATMEGA32 chip which has a memory of 32 kB?
0
votes
4answers
462 views

How do I get started with PIC programming? [closed]

So I opened up a big bucket o' worms asking this question. Two of the answers mentioned that instead of using a 555, a PIC10F200 or PIC12F675 may do the trick. Now, I've been spoiled with Arduino's ...
29
votes
3answers
45k views

FPGA programming, where to begin

I'm a software developer (C, C++, objective-c, java ...) and I am interested in learning to program FPGAs. Now the question may appear simple to you but please do take time to help me on this one as I'...
20
votes
5answers
4k views

Survey of High-Level Language Interpreters/Compilers for Microcontrollers

I would like to generate a list of high-level language interpreters and compilers (e.g. something that compiles LISP to C code) for microcontrollers. I've done a bit of research so far that I will ...
19
votes
5answers
72k views

How different are 8-bit microcontrollers from 32-bit microcontrollers when it comes to programming them

Right, so we have 8-bit, 16-bit and 32-bit microcontrollers in this world at the moment. All of them are often used. How different is it to program 8-bit and 16-bit micrcontrollers? I mean, does it ...
8
votes
7answers
67k views

How do I write to SPI flash memory?

I'm working on an audio application where instead of storing audio data on an SD card (Waveshield on Arduino) I'm storing it on an SPI flash memory IC and rolling my own board with MCU, DAC, and amp. ...
4
votes
3answers
16k views

How to start embedded Programming? [duplicate]

Possible Duplicate: How to become an embedded software developer? I am really a new bie and have some idea about embedded C. I want to program embedded devices using my computer and even want to ...
3
votes
3answers
619 views

Should I refactor my C code to optimise it for an embedded microcontroller?

Below is some code implemented on an 8 bit microcontroller. The following comment was posted to another question: As your code doesn't use the i variable, why ...
3
votes
4answers
7k views

Simplest way to upload sketches onto “hackduino” without having a arduino duemilanove

Update: The ATmega came bootloaded with the arduino software is that can simplify anything I have this board: I'm looking for a bone-simple way to upload sketches. Ideally without buying additional ...
7
votes
5answers
6k views

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port?

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? I can work around this problem by writing a byte to the entire port, ...
1
vote
3answers
11k views

How to set all flags in 8085?

My Microprocessor teacher of 8085 gave an assignment to set all flags ! I have written this little program to set all except Sign, Please help me out ...
-2
votes
2answers
540 views

Can I use math functions in PIC16F877A code?

Can I use exponential (exp) math function in PIC16F877A code? For example like this: double a,ans; a=5.7; ans=exp(0.5);
-2
votes
3answers
265 views

How can I get started with electronic engineering [closed]

How can I get started with electronic engineering i have no experience what so ever but i do know programming languages like java and c sharp. so how can I get started i have budget like $100
51
votes
5answers
41k views

Programming microcontrollers: JTAG, SPI, USB oh my!?

I've noticed, with regards to microcontrollers, there are several way to program them. I am sorta familiar with USB as my Arduino's can be programmed via USB. What is a JTAG or SPI interface? ...
22
votes
10answers
30k 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 ...
7
votes
8answers
3k views

Embedded C programming material

I am looking for some material (books/sites) related to embedded system programming in C language. Here in the lab we have available three plataforms: one Microchip PIC18f4550, one Freescale HC12 and ...
24
votes
2answers
30k views

What is bit banging

I am new to microcontroller programming. I am using ATmega32-A controller and CodeVisionAVR compiler. I am using the waveform generator(AD9833) to generate a sinewave signal using SPI communication. I ...
17
votes
3answers
32k views

Which programming languages are supported to program Arduino?

I would like to start to play with Arduino. I've read that C and C++ are the official languages but I've also found other way to communicate using Python or Java for example. Which programming ...
5
votes
2answers
4k views

MCU programming - C++ O2 optimization breaks while loop

I know people says code optimization should only bring out the hidden bug in the program, but hear me out. I am staying on a screen, until some input via an interrupt is met. Here is what I see in ...
5
votes
3answers
12k views

C/C++/C# programming for interfacing USB to PIC microcontroller

I am a computer sciences student looking to do some PIC microcontroller programming for some small home projects . I am fluent in C/C++/C#/Java and i also have an understanding of programming ...
1
vote
2answers
830 views

How to calculate the total resistance of this electrical circuit

I'm a programmer and I'm making an Artificial Intelligence for a boardgame called Hex. Since I am not that familiar with electrical engineering, I need your expertise on this subject. I am now ...
0
votes
1answer
407 views

How to send data from PC to an AVR32 microcontroller using USB?

I have a board with an AVR32 (AT32UC3B0512) and a USB port. I would like to send data to the USART, using a terminal from my PC, but I don't know how to use the USB to access the RXD and TXD pins. I ...
-1
votes
2answers
287 views

How to get data from S-record file [closed]

Please tell me something about the S-record file format and how we can get data from it. The first S1 record is comprised as follows: • S1 S-record type S1, indicating it is a data record to be ...
5
votes
4answers
18k views

Delay function in ARM programming

I have just started programming on ARM, I had some experience on AVR but not that much. The question is probably too trivial but the material about ARM is too little on the net... sorry anyways. I ...
5
votes
1answer
7k views

How do for loops work in verilog? Why can't I achieve what I want?

This is my code for a simple 2-1 8 bit multiplexor, where SW[17] is my selector. If it is on, show Y = SW[15:8], if it is off, ...
5
votes
2answers
455 views

Programming several AVRs with one ISP: which line to break?

Let's suppose that I have two AVRs connected to one ISP connector. To programm only one MCU in this configuration I neet to break one (or mayby several) lines goes to the MCU I don't want to be ...
4
votes
1answer
336 views

ARM Cortex M Power Consumption — Sleeping with Higher Clock Speeds vs. Lower Clock Speeds

I'm starting with Cortex M processors, but I have lots of experience with 8bit MCUs. Say I have a buffer that needs to be updated every 5ms. There is an interrupt that goes every 5ms and the buffer ...
4
votes
3answers
1k views

Why set PORTx before TRISx?

I was browsing through the example code that MikroE provides for PIC programming using MikroC, and they always set PORTx before setting TRISx. What is the reason for this? Since TRIS just selects ...
4
votes
3answers
7k views

ICD3err0045 - PIC16F819 Programming

After posting: Programming/Debugging with ICD3 and PIC16F819-I/P I'm still getting the MPLAB error: ICD3Err0045 - You must connect a target device to use MPLAB ICD 3 My Setup (pinout and wireup): ...
3
votes
1answer
768 views

Problem with while loop

I am trying to read external ADC AD7798 values using ATmega32-A controller. In the datasheet, Status register Bit 7 (SR7) indicates the conversion is finished or ...
3
votes
5answers
16k views

How to calculate phase shift between two sine wavefroms

I two sinewave signals with same frequency. I want to measure phase shift between two signals. There will be a small phase difference between two signals. I am using ATmega32-A micro controller and ...
3
votes
2answers
508 views

How do you independently program a GSM/GPRS IC [duplicate]

I see these GSM/GPRS modules that you can use with a microcontroller but all of them use the microcontroller to control the module using AT commands. After a bit of googling i saw this GSM/GPRS IC '...
2
votes
1answer
210 views

How can I program GALs on a shoestring budget?

GALs may be obsolete technology, but they're still readily available, and are dirt cheap. For a hobbyist like myself, they're ideal for small projects that need something a little faster than a low ...
2
votes
2answers
2k views

Analog to digital conversion

I am using an Atmega32-A microcontroller and an AD7798 external ADC. I am able to set the ADC registers and read back ADC values. I have written the following code: ...
2
votes
1answer
521 views

How do you get a program onto an eZdsp board?

I'm using an eZdsp board which has a TMS320f2812 chip on it. The board has a parallel port on it which is used to program it. I'm experienced with software but not at using microcontrollers or DSPs ...
2
votes
1answer
744 views

Transfer Function of Non-Ideal Transformer

What is the mathematical relationship between primary and secondary windings? It can be either in the s-domain, or a time domain expression. This expression must contain all realistic parameters, ...
1
vote
1answer
1k views

Programming/Debugging with ICD3 and PIC16F819-I/P

ICD3 passes internal test with MPLAB IDE using the Test Interface Module PIC16F819-I/P supports ICSP and In-Circuit debugging source. ICD3 pinout is as follows (source): ...
1
vote
2answers
1k views

What type of USB Protocol for Datalogger

I am attempting to create a USB datalogger and would like to first start with creating a program that transmits Hello World over USB not using some kind of CDC communication. I am trying to figure ...
0
votes
1answer
2k views

PIC Write-Protect Behavior

When I write protect a PIC using the config bits, does it prevent all future programming or can I still reprogram the part if I erase it first? I assume this behavior should be standard across all ...
0
votes
1answer
1k views

RF decode logic (not Manchester encoded) - Arduino

Continuing from my previous post, I am trying to decode the encoded RF data directly on Arduino. I've adopted the "sampling" approach, as against the "interrupt" based approach, reason being I believe ...