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 ...

learn more… | top users | synonyms

0
votes
0answers
21 views

Trouble getting push button working in Nios II

To give you an idea of what I'm trying to accomplish, the 18 LEDs on the board are to scroll right to left, then back to the right, and keep looping as such. Where the push button comes into play is ...
-4
votes
0answers
46 views

to print alphabet and number on 16 x 2 LCD [on hold]

what is the program to print alphabet and number on 16 x 2 LCD using AT89C51 microcontroller using c? To print manually any message on LCD to using 4 x 3 keypad and 8051 microcontroller in c.... ...
0
votes
0answers
20 views

How to write data to the MIFARE Classic card [on hold]

I am working on an NFC project with a MIFARE Classic tag. I want to know how to write data to the MIFARE Classic tag. I have an empty tag. Please tell me the APDU commands which I need to use for this ...
0
votes
2answers
154 views

Why can't I use a variable in an if statement?

I am new to Pic microcontrollers and just started programming them. Now my problem lies in this code: ...
-3
votes
0answers
24 views

ELAN EM78P156NP SAMPLE PROGRAM [closed]

Can anybody please share a sample program for ELAN EM78P156NP microntrollers in C or Assembly language? Or any link where I can find sample programs for the same microcontroller.
0
votes
1answer
28 views

Measuring pulse length with ICP

I am trying to measure pulse length, with ICP (input capture pin) on Atmega8, coming from this circuit:. PINB0 is ICP pin on AVR. This is (most of) the code: ...
-1
votes
1answer
93 views

Proteus error “Stack overflow is forcing device reset”

I used PIC18F452 microcontroller for my project. And I'm using mikroc pro software. My code compiled successfully. But in proteus, it will give the error "Stack overflow is forcing device reset". And ...
0
votes
1answer
54 views

#10269 output file exceeds code size limit

Using Code Composer Studio and MSP430F5438A I get that error when compiling, but if I randomly delete some lines of the code, it will work fine. The problem is that I have not finished yet and there ...
0
votes
0answers
48 views

How to read write an SD card in SD mode on SAM4S HSMCI

I have managed to initialize the HSMCI and SD card in SD mode on SAM4SD32C. I can now check the relative card address, card capacity and have enabled the full speed and 4bit bus width for the ...
-1
votes
2answers
74 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);
1
vote
1answer
50 views

how to clear an UART interrupt flag manually?

I'm using an ATmega32. I have ISR(USART_RXC_vect) as follows ...
0
votes
2answers
59 views

ADC 10-bit false results

I'm using atmega32 µc with the internal 10-bit ADC. I connected my potentiometer to the ADC 1 and I'm using 5 V Voltage Reference. using the following code, I did the ADC-config ...
0
votes
1answer
38 views

Writing data over Serial comm //Arduino & MPU6050 gyro+accelerometer

I'm new to serial communication and I am just scratching the surface, therefore please bare with me. What I need to accomplish is the transfer of the gyroscope data I gather on my Arduino to ...
0
votes
1answer
91 views

Why does my MCU go back? (to the previous instruction)

I don't know why but I see the same odd behaviour sometimes in the debugger environment. Look at this code (function): ...
1
vote
1answer
40 views

RTCC interupt doesn't work

This is my first use of the RTCC interrupt for dspic33F and P24h. I have set the date and the alarm, when the alarm goes on, the LED attached in PIN 15 will blink. The code compiles but there is no ...
-1
votes
0answers
35 views

How to make bulb blinks using SlimBoard?

We are pretty new in Developing Embedded System. We have a problem regarding on how to make Bulb connected in Port B blinks? Bulb connected in PORT B We are using z8f6421 Zilog SlimBoard ...
1
vote
0answers
23 views

What are the caveats of placing PSoC 4 variables in flash?

PSoC4 chips have only between 2 and 4KB of RAM. That's not much, especially if I want to do some data processing. Between 16 and 32KB of Flash seems much more promising, even if I need to share it ...
1
vote
2answers
79 views

PIC18 xc8 compiler : how to resolve warning (335) unknown pragma “code”

I'm trying to compile this code to blink led with button interrupt, using xc8 compiler and PIC18F4550. I got those warning, so the code lines are ignored and the program doesn't work properly (by ...
1
vote
3answers
64 views

Weird output on 16X2 JHD162A LCD display

I am learning interfacing of Atmega 16a with 16X2 LCD. I have a written a header file for routines which will used frequently and every time I want to interface with LCD using Atmega 16a I use this ...
0
votes
1answer
113 views

If condition strange behaviour

I brought an ATmega328P (SMD) and burned a Duemilanove Bootloader. Everything seemed to be working fine until I tested out conditional statements. Average set of analog val are: 84 , 143 , 255 Here ...
2
votes
1answer
51 views

How to configure PIC24F oscillator?

I'm coding on PIC24F and I'm still fighting with oscillator configuration. Between configuration bits and SFRs such as CLKDIV and OSCCON I am a 'bit' lost... I've been making things work by trial and ...
1
vote
1answer
74 views

Problem with the explorer 16 dev board

I have the explorer 16 dev board equipped with the PIC24FJ128GA010. I wrote a C code to write something on the LCD and a LED blinking after that. I wrote the same code in assembly and both codes work. ...
3
votes
2answers
65 views

NSS pin goes high immediately

I'm working on a simple project with stm32f0. the project is when I push the button on the board, the SPI1 of the MCU should send the data. all things work nicely but there is a problem. look at the ...
0
votes
1answer
82 views

Self-made Arduino pushbutton bank not working

So I'm trying to make a 5 key keypad like circuit, but with increased tactile feel, so I forwent actual store bought pushbuttons. I rigged up keys with some aluminum foil and pieces of plastic and ...
0
votes
1answer
34 views

ATmega8 to MCP23S17 SPI I/O Expander not working

Since three days I'm having the problem that I can not talk to my MCP23S17 SPI I/O Expander from my ATmega8. I've double ...
1
vote
3answers
106 views

External oscillator problem

I have this sample program to blink LED with PIC18F4550 using external oscillator. I'm using a 20.000 MHz crystal oscillator with 30pF capacitors. The problem is when I wire the capacitors the the ...
2
votes
1answer
70 views

UART Flow Control

I confused little bit regarding flow control. I have two devices, one is having UART flow control pins (RTS and CTS) named as Device 1 but other device don't have named as Device 2. The device 1 ...
-1
votes
1answer
91 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 ...
3
votes
2answers
113 views

Casting integer to character

I am using PIC18f microcontroller. I have to write a 16 bit integer variables (2 bytes) which was cast into two character variable i.e to write each byte in a consecutive adrressess of EEPROM. By ...
1
vote
1answer
45 views

Xilinx Video Timing Controller freezes processor

I'm trying to acquire video from an image sensor using a ZedBoard with Vivado 2014.2 and I used an existing (working) video passthrough project of mine and simply added in a debayer (color filter ...
1
vote
1answer
87 views

PIC12LF1552 I2C; uC won't exit Start Condition

So I've been tackling this problem with integrating I2C functionality into my code, which is documented here on StackOverflow: ...
1
vote
2answers
76 views

How to stabilize adc output display on 7 segment

I am designing a simple voltmeter. I am using 8 bit ADC of PIC16F72 and Mikro C compiler with a multiplexed 7 segment display. I am getting ADC value on 7 segment display but its continuously ...
0
votes
1answer
50 views

ELAN EM78P156NP microcntroller programming

I am writing program for ELAN EM78P156NP using WisePlus C Compiler ,but my program is not responding when written on micro controller.I am putting the code below please let me know what is wrong with ...
0
votes
2answers
65 views

Which is better after rewriting the ROM on a PIC16F? A software reset instruction or a watchdog reset

I am working on a project where the uP can be calibrate at any time. The new calibrated values are stored in the uPs ROM. After the calibration is complete, I have to reset the uP such that the ...
0
votes
0answers
53 views

Storing and retrieving Real time from the RTC

Im working on the Intel Galileo board and my aim is to display both the current time and temperature every second on the serial monitor . However each time the USB get disconnected from the PC and ...
2
votes
2answers
89 views

Displaying a custom character on 2x16 LCD

I have written a working LCD driver for a NHD‐0212WH‐ATGH‐JT and I would like to add the possibility to create your own custom characters. Through some research I understood that I need to write a ...
0
votes
0answers
39 views

Send multiple data to Xively client

This is my first time using GSM shield send data to Xively client. I have read through the example from Arduino tutorial and merge the code together with mine. I managed to send one data over to ...
0
votes
1answer
83 views

Microchip PIC32 MEB Audio Recording

Well, I was just wondering, I have been using the Microchip PIC32 USB Starter Kit with the MEB (Multimedia Expantion Board 1) for some projects. One of them is to record audio and analyse it, the ...
0
votes
1answer
164 views

Using CooCox as an alternative to Keil MDK-ARM - any limitations?

A very popular and advertised tool for programming ARM microcontrollers is Keil MDK-ARM. The evaluation version can be downloaded here. However there is a code-size limitation of 32kb for using the ...
1
vote
3answers
103 views

How can I make a latch in AVR without interrupts?

I want to make a simple circuit that when you press a pushbutton, an LED lights up stays lit until the button is pressed again. I haven't delved into interrupts yet on AVR, and was wondering whether ...
1
vote
1answer
107 views

Arduino EEPROM store multiple data

I just need a small help to completed my project. As my output is printing 2 result but only 1 output is saving to the eeprom. How can I save multiple data into eeprom? I'm just showing the setup and ...
0
votes
1answer
57 views

STM32F4xx input pin reads wrong state on first run but not subsequent

I am working on a program which reads the state of a pin at startup to determine an operational mode. When I run the code on first power up, it reads incorrectly, but subsequent resets without power ...
1
vote
1answer
69 views

C Documentation for AVR Atmel Studio

I am new to AVR programming and have tried couple of tests on assembly language and were successful. However, I would like to try out programming in C with ...
-1
votes
1answer
108 views

Memory translation

I write to flash: void write_SegC(char data) { } And then send it back to PC: void read_SegC(void) { } what I get in ...
1
vote
1answer
152 views

Regarding Microchip XC8 compiler's registers and bits definitions

I'm going to take a random 8-bit Microchip microcontroller: PIC16F887. Let's have a look at how the XC8 compiler (and the HI-TECH PICC, for that matter) is defining a register (SFR) and its ...
1
vote
2answers
80 views

Arithmetic Overflow ATmega328

I have written the following function to calculate the current timestamp (since 00h Jan 1 1900). The output I get is: ...
0
votes
1answer
131 views

What are these pulses?

To continue of this question... I figured out the main problem and now I have an odd problem. at first, let me to put the codes. "Main.c": ...
0
votes
1answer
62 views

How to ensure serial transmission and reception of required data without any garbage values in the 8051?

I'm trying to continuously transmit the character 'L' from the microcontroller 8051 to the PC at a baud rate of 9600. The frequency of the 8051 is 16 MHz, and I accordingly loaded the BRL register ...
3
votes
1answer
65 views

AVR - ATmega16 - Timer config

Trying to figure out the timer setup in Atmel Studio 6 for an ATmega16 microcontroller. And I just don't get it. I am trying to create a TickCount similar to GetTickCount() Retrieves the number of ...