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

1
vote
0answers
15 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
55 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
51 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
110 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
41 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
59 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. ...
2
votes
2answers
51 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
76 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
25 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
95 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
67 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 ...
0
votes
1answer
84 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
106 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
33 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
79 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
54 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
33 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
63 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
51 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
82 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
26 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
69 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
0answers
7 views

Knowing the Arduino memory capacity [migrated]

I am using Arduino uno. My data is storing into EEPROM whenever i run my program, it will store multiple data depend on the loop. For my program it calculate 10 sample in 0.1 sec, so 100 sample in 1 ...
0
votes
1answer
96 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
95 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
100 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
55 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
63 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 ...
0
votes
1answer
77 views

Flash Mem. Read/Write

Using SerialPort communication between PC and MSP430F5438A. It's C# on the PC side and Code Composer Studio (CCS) on the MSP430 side. I'm sending "Hello World!" to MCU. I set the flash pointer to ...
1
vote
1answer
125 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 ...
0
votes
2answers
78 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
112 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
60 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
61 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 ...
0
votes
3answers
136 views

Run program directly with MPLAB X(PIC16F628A)

I want to blink LED with PIC16F628A and run it directly with the button make and program device main project of MPLAB X. to programing the PIC I did simple wiring ...
1
vote
1answer
202 views

How to intitalize data in Program Memory

Im using MPLAB IDE & C18 compiler to program Pic18f2550. I have to initialize a const string in program memory to save space in RAM how do I do it ?
1
vote
1answer
55 views

Is the output clock correct?

I have written and using a STM32F030F4 for toggle a pin. I configured all things and my program is this (I use GPIOA->ODR ^= GPIO_PIN_2 for toggle GPIOA2 in ...
0
votes
0answers
41 views

UART PIC18F8722

I'm trying to connect a bluetooth module (the baudrate is 9600) with a PIC18F8722. The connection is with UART and I programmed this: ...
0
votes
3answers
81 views

How to do a specific task after some time

I have to switch on one relay after some specific time, but at same time I have to do continuous polling for controlling other relays, I am already using interrupt for multiplexing purpose (7 segment ...
0
votes
1answer
33 views

How to Prevent continuous switching fluctuation?

I am designing a digital stabilizer ,I am using ADC feature of Micro controller to sense incoming voltage and processing output through an AUTO Transformer .The code is like ...
0
votes
1answer
91 views

Displaying different Data on 7 segment

I am Designing a Digital Stabilizer ,where I have to Use a Multiplexed 7 segment Display to Show Input Voltage & Output Voltage ,I have successfully able to see input voltage but I am unable to ...
1
vote
1answer
62 views

C Programming for 8051: SFR directions as arguments

I'm currently making a very simple Tic-Tac-Toe game with an AT89C51RC2 and I am having issues getting the button input right. Basically, the input is a 3x3 Button Matrix which I want to utilize by ...
3
votes
2answers
232 views

SPI1 doesn't work

I'm working on a simple project. I want to send a string. the string is "Rohalamin". the second board after recieve the string should turn on the LED. the program for first board is (the MCU for ...
1
vote
1answer
85 views

USART communication problem on PIC18F6722

I am trying to use enable USART communication on a PIC18F6722 microcontroller. More specifically enable the receiver and attach a receive interrupt to it. The datasheet describes the relevant bits ...
3
votes
2answers
130 views

Where is the C API reference for the MSP430? CCS version

I see a lot of sample code and tutorials, but where is it documented that symbols (defines) such as P1OUT and P1DIR are ...
2
votes
1answer
86 views

PIC12 TRIS Register not setting, No GP0 GP2 output

I originally asked the this question on Stack Overflow. I think here would have been a better audience. I'm trying to program a PIC12C508A to do a simple LED learning circuit. I've read some ...
6
votes
1answer
735 views

Are pointers treated differently in AVR compared to say x86?

Microcontroller: ATtiny13 IDE: Atmel Studio I'm trying to write a Hello World application by writing high to port PB4. This works fine: ...
1
vote
2answers
148 views

Executing code at diferent speeds, using one timer, and no extra RAM

I was wondering, will this actualy work? (when timer / prescaler set) It saves RAM by not using extra variables. Are the better ways of doing this? ...
0
votes
1answer
53 views

Avoding repeated queries while working in a WSN set-up of Coordinator-->Repeater-->End Device , when Coordinator and End device are in Range

I am working on a WSN set-up. I posted a question earlier on the same. I had a another question with respect to the same. My question is while working in broadcast mode, if Coordinator and end ...
1
vote
2answers
158 views

Problem with USART programming

I have got a problem with an USART module I wrote in C for PIC12F1822, related to USART transmission. Everything happens to be fine when I debug in MPLAB with PICKIT3 (TXREG changes value and every ...