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
9
votes
3answers
9k views

Using multiple external interrupts in PIC

I've used PIC16F877 (datasheet) for several projects. For a single external pin change interrupts, you can use PORTB0 interrupt. ...
3
votes
5answers
6k views

Arduino Mega 2560 stuck at uploading

I have two Arduino Mega 2560 boards, both gives errors when trying to upload sketches (I bought the second board thinking its a fault with the first one, but same thing happen with the new board). ...
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
votes
1answer
828 views

How can an experieced programmer get into embedded programming and robotics [duplicate]

Possible Duplicate: How to become an embedded software developer? I would like to know what is the best method to begin learning embedded programming and electronic skills? I am already very good ...
4
votes
2answers
5k views

Implementing a continuous time transfer function in PC code

I have a transfer function like this: \$ H(s) = \frac{1}{Ts + 1} \$ I converted it into a difference equation to solve it iteratively: \$ H(s) = \frac{Y(s)}{X(s)} = \frac{1}{Ts + 1} \\ TsY(s) + Y(s)...
0
votes
2answers
2k views

Converting 10 bit (2:8) value to 14 bit (6:8) result

My C skills are seriously lacking, and I haven't come up w/ a good way to do this on 8 bit architecture. I've tried shifting by 4, but then I lose digits, I know I can just multiply my 10bit result ...
6
votes
1answer
894 views

Multi-Device JTAG

I am designing a circuit. it will include ARM LPC1769 and AVR ATmega2560. I want to program these chips with JTAG. Now, the question is: Is that possible to do it with a single JTAG programmer ...
8
votes
7answers
69k 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
1answer
11k views

How to offset program location in memory with MPLABX XC8?

I have a bootloader residing at locations 0x0000 to 0x0fff on an 8-bit PIC18F. How do I tell the XC8 compiler to output a hex file which starts at 0x1000? With a CCS compiler my friend is using, he's ...
0
votes
4answers
2k views

Any microcontrollers which can be directly programmed on a breadboard? [closed]

Does anyone know of a microcontroller which can be directly interfaced and programmed through a PC using serial/parallel/usb port? I am looking for a microcontroller which can be plugged into a ...
0
votes
1answer
1k views

Programming a Baby Orangutan using Arduino Uno?

I have the following setup: Arduino UNO without the chip: Notice that the Atmel chip is missing. And i have a Baby Orangutan: The orangutan burned with Arduino Uno R3 Bootloader. I connected ...
0
votes
2answers
4k views

How to get data from one micro controller to another using UART

My concept is I have two designed boards, One with AT90USB1287, other with ATmega32A both are working properly. AT90USB1287 is talking to the PC via USB. ATmega32A is talking to the PC via USART(...
1
vote
1answer
275 views

Accelerometer and Transistor

Here is my program, I want to: The microcontroller, Arduino UNO R3 sends 3.3V to the sensor, Accelerometer, MMA7361 The sensor turns on and send signal to the microcontroller. When I move the sensor ...
4
votes
2answers
1k views

If YOU were starting out now, what PIC16F-compatible IDE and compiler would you choose, and why?

This is going to be a bit long as I wanted to cover all the obvious questions before they arise, give a rationale to some of my thinking, and prove I've done my groundwork! If time is short, skip down ...
5
votes
2answers
1k views

Why is PIC Programming Voltage Higher Than Vsupply

I work with PIC microcontrollers quite a bit and have never understood why Vpp (programming voltage) is higher than the max supply voltage that powers the PIC?
2
votes
3answers
2k views

MPLAB XC16 compiler outputting 8-bit HEX files for PIC24?

I am trying to understand a HEX file I compiled with Microchip MPLAB X IDE using the Microchip MPLAB XC16 Compiler. Concerning the MCU, I am targeting the PIC24EP512GU814. However the scope of this ...
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
2answers
371 views

PIC24E writing address and increment for ICSP programming

I am trying to program my Microchip PIC24EP512GU814 in ICSP mode. The resource I'm using to do this is the Microchip dsPIC33E/PIC24E Flash programming Specifications (70619B) and the Microchip ...
-2
votes
1answer
2k views

career advice embedded software development? [closed]

I am a fresh BSC electrical engineering graduate and very much interested in the software side. and i have a couple of questions for people who have some know how of embedded software development. ...
11
votes
3answers
3k views

How do companies pre-program chips?

In particular I'm interested in SMD packages. A DIP package I would assume is simply put into a socket and programmed that way. Of course you could get around this by designing a programmer header ...
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 ...
-5
votes
2answers
525 views

problem with reading values in case

I am using ATmega32-A microcontroller and CodeVisionAVR compiler. I am able to read values from an AD7798 external ADC successfully. I am also generating wave from with an AD9833 using SPI ...
-1
votes
1answer
663 views

Logic needed to read and store values

I am new to programming. I have one input signal from waveform generator. I am giving this signal to one sensor and as well as channel 1 of multiplexer. The sensor output is giving to channel 2 of ...
0
votes
1answer
144 views

Program which turns power on/offf

I am a software developer and just started my journey in electronics side. I had this particular idea which I want to do for my project. Problem statement: In my college every room has fans and ...
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: ...
9
votes
2answers
1k views

What is the physical representation of the heap and the stack?

I can easily understand how .bss and the code have physical representations in the processor which has a memory bank for the instructions that a program counter can count up and the bss (block ...
-1
votes
4answers
3k 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 ?
0
votes
1answer
283 views

Loop is executing infinite times

I am working with an ATmega32-A microcontroller. Using USART communication, I am displaying data on monitor and am using switch case to select different commands. In one of the commands I have written ...
3
votes
1answer
784 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 ...
24
votes
2answers
31k 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 ...
1
vote
1answer
290 views

problem with printing function return value

I am new to programming. I have small doubt, I know this is simple question but I am confused. I have the following function: ...
3
votes
2answers
5k views

Arduino EthernetServer with interrupt

I have an arduino application doing two things in the loop: A webserver that waits for a connection and renders some html forms to change configuration values. ...
2
votes
2answers
466 views

Watchdog Signature in Flash memory or RAM?

We used to use Watchdog signatures in our control applications. Basically we used to allocate a reserved memory in RAM(uninitialized) and used to store the watchdog signatures. On power on, the ...
0
votes
1answer
128 views

I'm looking for a chip which can play media files stored in a pen drive connected to it on LCD tv

I am searching for such a chip which has a usb input to connect a pen drive to it. The chip should have a HDMI output (or any other suitable output) to display on a LCD tv. For example, I have a movie ...
2
votes
2answers
202 views

Algorithm for value range mapping

My question perhaps belongs to general ability test or something like that. It is not directly related to Embedded devices. I have been given a variable resister which can rotate infinitely and is of ...
3
votes
2answers
742 views

Ultrasonic rangefinder (for beginner)

I'm quite beginner in electronics. So, to begin with, I wanted to make a simple (?) ultrasonic rangefinder, based on microcontroller. So I had a few questions for experienced in electronics: What ...
0
votes
1answer
9k views

Arduino Uno replace with Atmega8

Can I take out the Atmage328 and replace with a Atega8 for programing instead of trying to program using a breadboard?
29
votes
3answers
46k 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'...
2
votes
1answer
402 views

What's the best way to virtually design and test your circuits?

I've been reading up on some old tech manuals and found that apparently some IC chips where designed and tested in BASIC. While I already have a copy of Eagle and fritzing these are more for board ...
4
votes
1answer
1k 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 ...
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 ...
3
votes
2answers
323 views

Programming to read X-10 over USB or Serial

Does anyone here have experience writing a program that would receive signals from Visonic, or other X10 sensors such as door detectors or motion detectors? Essentially, I would like to write a ...
3
votes
3answers
1k views

Microchip PIC10 (8 bit microcontroller) learning reference. Where to start?

So I've generally learned how to use an Atmel Attiny13a, but now I have found that I need to switch to a Microchip PIC 8 bit microcontroller such as the PIC10 series. Can anyone give me some good ...
0
votes
1answer
1k views

Preprogrammed Atmel microcontrollers?

Where can you buy preprogrammed atmel microcontrollers such as the attiny13a microcontroller in a surface mount package? I know you can buy preprogrammed PIC microcontrollers, but not atmel ...
2
votes
3answers
502 views

MCUs programmable by USB or ethernet

The NXP LPC1342 microcontrollers have a built-in bootloader which allows programming the device via usb: The bootloader is triggered by pulling one pin to GND on bootup. The microcontroller then ...
5
votes
1answer
1k views

Led Matrix using PIC

For a project I am working on, I want to build a 9x9 monocolor LED matrix also with 9 push buttons to control the LEDs using the PIC. So far I have gathered that I think I will be needing shift ...
6
votes
1answer
252 views

Final steps in device manufacturing - AVR programming and board assembly

After I have prototyped my circuit and built AVR code for a device I want to sell, how do I go about getting mass production done? Will a PCB manufacturing and assembly shop be able to take the ...
4
votes
3answers
778 views

microcontroller programming

In reference to this question Is it possible to program the LEDs each to flash on consecutively each with its own activation speed in the sequence chase then add some sort of a randomizer ...
2
votes
1answer
3k views

Is it possible to use openocd to program an atmega using an AVR ISP (mk2)?

I have an ATMega2560 on a custom board which I want to program with my AVRISP mkii. I have successfully programmed it using the Arduino IDE, and also over the commandline using avrdude. Is there a ...
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 ...