C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C ...
1
vote
2answers
436 views
How to blink an LED on ARM STR9
I am quite new to STR 9 and also to micro controller programming.
Can anyone please explain the meaning of these lines in the example blinky. I am having trouble in understanding it. Thanks
I want to ...
0
votes
1answer
1k views
USART communication with PIC16F688
I am trying to make my pic to send the value of the potentiometer (on PICKIT 1) through serial. At this step I am using an oscilloscope to see if it is doing well.
I wrote the code below, but nothing ...
3
votes
5answers
3k views
Sending signals to USB port using C
I want to send a simple 5V signal to the usb port. The USB cabel's insulation will be removed and connected to a relay which is connected to an electric door system. I think I should write this code ...
2
votes
1answer
490 views
FSL Bus Problem in Xilinx FPGA Data Return
I wrote a custom IP peripheral in Verilog and interfaced it to MicroBlaze, using a hardware co-processor option. I can see the peripheral connected on the System Design Diagram. Everything compiles ...
4
votes
3answers
336 views
What is wrong with this PIC pin change detection?
I have two PIC18F4620 connected via SPI + Slave Select + additional IRQ line. Both controllers are driven from the same crystal oscillator using the same clock settings. The master sends one byte and ...
4
votes
2answers
401 views
What do the C operators “&=” and “|=” do?
I've been working trying to read some C code and I've found some operators that I don't know:
What's the use of "&=" and "|=" operators when used for microprocessors programming?
0
votes
2answers
530 views
pic 18F4550: local variable problem:
I'm using the pic18F4550 with microchip v8.63 and with the C 18 compiler. I'm using a LDR that retrieve the value of the led (not on my picdem board) (red, green and blue) these values are stored in a ...
0
votes
1answer
198 views
Mac based AVR development issue
Ok, so I reinstalled my development enviroment on the mac using the latest build of avr-gcc (4.4.2), avr-libc and avrdude from the Fink project.
Problem is when compiling I keep on getting a linker ...
3
votes
2answers
569 views
Enable port RA0 as input and retrieve value LDR from led
I'm using the picdem 18F4550 with microchip v8.63 with the C18 compiler.
I will enable PortA to set as input, I will connect a LDR on port RA0. Which is as following (I think):
...
4
votes
3answers
696 views
Usage of the #pragma pack(1) compiler directive on embedded applications
I have recently come across this #pragma pack(1) preprocessor directive and was wondering why it is being used?
I Googled the usage, and found it has other options such as push,pop etc. Has anyone ...
0
votes
2answers
904 views
sbit definitions with SDCC - Error: “initializer element is not constant”
I am facing this error when try to compile a C program using the SDCC compiler:
The part of programme that is causing error.
...
1
vote
1answer
308 views
UC1698 based LCD driven by AVR
Ok so i've got a BTHQ128128 fstn display that i'm tryinf to drive via an ATMEGA128 AVR chip using gnu-c (avrlibc). Found some code on the interweb, but still not able to get the display to show ...
3
votes
3answers
2k views
Converting c file to HEX
I am new to Embedded systems. I am starting my learning with AT89C51.
My first target will be LCD interfacing.
I have a programmer an LCD and a microcontroller.
But the program is written in C or ...
5
votes
2answers
685 views
Teensy USB Interrupts
I'm trying to learn about interrupts using one of the Teensy USB boards. It's got an AVR AT90USB1286 chip on it. I'm using the code below, and I'm expecting my ISR block to get called and periodically ...
2
votes
2answers
597 views
'keyboard from scratch' registering key presses
For my first hardware hack I'm taking a stab at a 'mechanical keyboard from scratch' (where scratch means individual components).
I plan to use a teensy++ board (16MHz) and was wondering about how to ...
5
votes
2answers
439 views
MATLAB toolbox equivalent for embedded system
We have to develop control software to run in an embedded system. The prototype is made in Matlab (using neural network toolbox), and we want to port the software to C or C++. Do you know which ...
3
votes
2answers
1k views
Macros V/S inline functions while programming for avr-gcc
I have been doing my first serious work of programming these days. I have been exposed to a lot of code by different developers. One thing I find confusing is how do these developers decide when to ...
1
vote
3answers
666 views
Invensense IMU3000 with PIC
Has anybody experienced using the Invensense IMU3000 gyroscope with some microcontroller?
The hardware comes with a really good library integrating full control of its features. This library is ...
4
votes
4answers
669 views
Problems with PIC A/D conversion
I am trying to read analogic signal for a sort of mouse with a pic18f14k50 controller. Here the simple circuit: http://dl.dropbox.com/u/14663091/schematiconew.pdf . I have to read analogic signal from ...
4
votes
4answers
1k views
What PIC24 C compilers are out there, and what is your opinion or review on them?
Specifically, the PIC24 series.
I tried out microchips C30 compiler, but it seems to be a bit too complicated for me, and I couldn't find any libraries with it.
Then I tried CCS, and it seems far ...
6
votes
3answers
529 views
PIC18 Memory Management
The limited stack size of budget PICs is a problem area and I have adjusted my code to accommodate this reality. I currently adopt a rough paradigm of grouping closely related functions into a module ...
3
votes
5answers
5k views
How to get a PIC32 SPI port working for transmitting data?
I am looking to get a SPI serial port running on a PIC32 (PIC32MX360F). can anyone point me to some good resources on how to do this so that a newbie can figure it out? I am using the PIC32 starter ...
3
votes
5answers
1k views
USART transmit problems on a PIC
I'm trying to send data to an SD card from a PIC18f4580, but the PIC is not sending what it should be.
related global variables:
...
3
votes
5answers
734 views
PIC16 Timer0 oddity
Using a PIC16F886, I am trying to generate interrupts every 100 milliseconds using TMR0 clocked from the internal oscillator, but I am getting some really strange behaviour.
This is a battery powered ...
2
votes
7answers
1k views
C language beginner
I want to do PIC programming in embedded C. But I don't know the language well. Please help me by suggesting some good sites for getting an idea about C programming.
3
votes
3answers
4k views
How do I modulate PWM frequency in realtime with a Microchip dsPIC?
I'm trying to change the PWM output frequency roughly once a millisecond using a dsPIC33FJ256GP710, and I'm having mixed results. I first tried this:
...
2
votes
2answers
1k views
How do I do indirect addressing in PIC ASM?
On my 16F628A's I want to iterate of a predefined sequence of values. How do I do this?
In C, I would do something like this:
char vals = {22, 10, 34, 16};
char id = 0;
port = vals[id];
id++
It's ...
6
votes
1answer
1k views
What should I know when making a library for the Arduino?
It occurs to me that, beyond my current problem, I ought to ask, "What should I know when making a library for the Arduino?"
First, what I am doing:
I'm using Eclipse as my editor and writing code ...
8
votes
5answers
3k views
Start off with embedded C with ATmega32 (ATmega AVR series)
I have a ATmega32 board laying around and I figure it would be perfect to start off with microcontrollers. I once did some babbling in embedded C (thats when I got this board) but the flow was stopped ...
