Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [8051]

The "8051" is a (still) very popular chip in the Intel MCS-51 micro controller series.

1
vote
3answers
109 views

555 Clock Circuit - how to choose resistor value?

I need to design a 555 clock circuit to output a clock pulse of a specific frequency. The circuit I'm using is this one (from here): I've used this circuit before and it works fine but the website ...
0
votes
1answer
61 views

What is the XTAL clock used for in an 8051 microntroller?

I'm trying to design an 8051 microcontroller circuit which uses timers/counters, and the circuit I'm using for inspiration uses a clock generated using the XTAL1 and XTAL2 pins of the IC, shown in the ...
0
votes
1answer
37 views

Reset MCU with a 1-0 button

I am working on a silabs C8051 MCU. It has a sleep mode which should be woken up by a reset. The mcu should start working (wake up from sleep) when the button in connected to Ground (Otherwise it is ...
2
votes
0answers
56 views

old 80C31 circuit not working. EPROM data retention issue?

I have an old piece of pro-audio gear in for repair. It dates from 1990. It was a fairly high-end piece of gear at the time and still has some value so it is worth repairing. But the symptoms I see ...
0
votes
0answers
13 views

Checking HM-TRP radio adapter for initial data

I have several HM-TRP radio adapters (consisting of the HM-TRP chip with a female header connected to it) of the same version. I tested it in a mini circuit where the PC does direct I/O with the HM-...
0
votes
0answers
27 views

Can 8051's ALE pin be equivalent to ground?

I want to add another port to the 8051 and I plan to do so by connecting port 2 (pins 21 - 28 of the 8051) to the Q inputs (pins 2 - 9) of an edge-triggered latch (74HC574). I will also connect the ...
0
votes
0answers
29 views

CC2530: adapting AVR/pgmspace.h for Zigbee

Goal: Adapt ENC28J60 codes written for ATMega328p (http://tuxgraphics.org/electronics/201204/embedded-ethernet-client.shtml) for CC2530. Problem: No equivalent library for AVR/pgmspace.h available ...
0
votes
0answers
43 views

minimalist serial port addon to a basic 8052

Currently I have two microcontrollers connected to each other so that I have two serial ports. One to the PC and one to a wireless radio module. Now I'm considering replacing one microcontroller with ...
0
votes
0answers
25 views

Bidirectional data bus divided into nibbles not returning correct data - 8051

Since I have 10 I/O lines connected between two microcontrollers (AT89C4051 + AT89S52), I am trying to get away with elegant data transfer. Instead of spending months redoing an entire circuit board, ...
1
vote
1answer
39 views

Byte-Banging 2 8051's using port addresses

Currently I have two microcontrollers setup in which entire ports are connected to each other (P1.1 connected to P1.1, P1.2 connected to P1.2, etc). I also have two pairs of extra GPIO pins connected ...
0
votes
0answers
22 views

Can standard 8051 timer 1 and timer 0 be available to programmer when serial mode 1 is used?

The micro is an AT89C4051. It allows two timers and a serial port interrupt. Currently, I set things up so that if any kind of data is received on the serial port, it just is loaded into memory by ...
0
votes
1answer
44 views

Do some microcontrollers require data to be loaded in temporary memory before programming?

When I programmed the AT89Cx051 series of microcontrollers, I didn't have to use special memory to program the data, but now even though I'm following the instructions in the datasheet (found from ...
0
votes
0answers
32 views

Can this circuit produce 0, 5 and 12 volts in fixed increments for the AT89LP4052?

Due to the speed requirements of my project, I'm looking at replacing the AT89C4051 with an AT89LP4052 with some code modifications since it offers double the memory and 6x the speed for the same ...
0
votes
2answers
89 views

Is it better on two closely connected microcontrollers to send nibbles with an ack or a byte with a delay for an ack?

I'm trying to figure out the best approach to transfer high-speed data one way between two microcontrollers (with their own crystals of the same speed) of the same variety (between AT89C4051 and ...
0
votes
1answer
114 views

8051 program not processing keypad matrix correctly

I made myself a small PCB (measuring about 6cm by 5cm). This is what is supposed to happen: Upon power-up, the LED goes red to indicate that the unit is ready for input. I then press any key down (...
0
votes
2answers
268 views

How to program 89C52

I am new to this site. I am now working on microcontrollers. I successfully burnt hex file to 89S52 using arduino as a programmer. But I want to program 89C52 as this is the cheapest atmel ...
0
votes
3answers
112 views

Why do we need to declare ports as input/output?

I am writing code in assembly language (AT89s51). When I see a standard program, the ports are typically defined as inputs or outputs. But, without defining them it seems to work fine. How is this ...
1
vote
1answer
22 views

Calculating required delay before pin value is recognized in 8051

I looked at the following in hopes my question will be answered: can we use 8051 pin as Input and output at a time? But the answer was vague. It stated: "though there is a 'strong' source ...
0
votes
0answers
55 views

8051's PCA Interference/Problem

I am using a CD4040 to divide a oscillator frequency and reading its period using PCA. The problem is I was using 3 oscillators, 120kHz, 70kHz and 30kHz and dividing it by 32. The problem is, when I ...
0
votes
0answers
312 views

Servo motor interfacing with 8051 by assembly language

I know the principles of servo motor and programming it, I already done it with FPGA and adjusted the PWM like I wanted. But with 8051 assembly, I can't do the PWM or generate the 20 ms for the motors....
-1
votes
1answer
221 views

how to create a hex file in keil?

I want to programme at89s52 micro controller...using Keil u5. I searched on youtube googled it tried everything but cannot see the hex file. it says creating a hex file/location but there are no hex ...
1
vote
3answers
443 views

why capacitors are used with crystal oscillator?

I want to learn 8051 programming so I begin from hardware in which crystal oscillator is connected with capacitors. can anyone please explain why capacitors are used and why those 22pF? how they ...
1
vote
2answers
225 views

8051 baud rate calculator using 16-bit timer for software UART timing

I'm making a project in which pulsed laser beam data is sensed through many optical sensors (one sensor per port pin), so essentially, I'm going to be making 4 UARTs to sense this. Currently I am ...
0
votes
1answer
140 views

direct ac mains to MCU pin for zero crossing detection

to detect Zero Crossing of ac mains, can i connect an EFM8 pin configured as input directly to 220V ac via a resistor?
1
vote
3answers
708 views

how to detect power failure and make micro-controller save data in EEPROM

I am using Arduino nano for a project in which I have on a counter which is continuously increasing. And I want to retain count after a power failure. Data is changing more frequently so storing it ...
0
votes
1answer
69 views

I2C Communication to the Matlab from Sensor board(8051 µC)

I like to connect my board to Matlab through I2C communication(I2C-USB cable). Is there any library or example scripts in matlab to do it? What are the procedure to do it. for example, I connected ...
0
votes
2answers
174 views

Program counter goes to the end of code and 8051 Restarts

I have an 8051 MCU which I use keil to program it with C. My problem is that the micro-controller restarts at the end of some functions while they should return. Using a debugger I tried to check it ...
0
votes
0answers
116 views

Microcontroller is being restarted on function return [duplicate]

I have 8051 MCU and I use keil to program it with C. But in some functions when the function ends and it gets to the return line the MCU is restated. For example a piece of my code is ...
0
votes
0answers
129 views

8051 programmer not working when laptop lid removed despite suggestions in comments

UPDATE I took a suggestion of disconnecting my external monitor from my laptop and the results were the same. What I did notice however is that the AT89S52 chip always reports the correct signature ...
0
votes
0answers
18 views

Optional program verification during chip programming (89c2051)

I am building a programmer for 89c2051, and writing a software driver that provides data from a PC via a serial bus to the programmer. My question is related to the order of steps of a programming ...
0
votes
1answer
71 views

8051 MCU with fast entry to ISR implementation

I'm developing a custom protocol processing device based on MCU. My protocol is somewhat similar to I2C and uses bit-banging instead of hardware implementation. I've done a prototype based on ...
0
votes
1answer
69 views

Converting negative numbers to hexadecimal number system

I was programming in 8051 and I faced this problem I had to convert the number -10000 to hexadecimal ( 2 bytes) the answer is 0D8h = #HIGH(-10000) 0F0h =LOW (-10000) but how the answer was found /...
3
votes
2answers
266 views

Error handling strings in a 8051

I am using a Texas Instruments CC1110, which is based on the 8051 microcontroller. I'm programming it using the IAR Embedded Workbench. I have written a function named ...
0
votes
0answers
340 views

MODBUS configuration in 8051 microcontroller

I am working with Master-Slave communication protocol and I want to send data (in my case tension of a diode) from my 8051 microcontroller to my laptop. I am using RS232 and 8051microcontroller with ...
0
votes
0answers
61 views

8051 Nested Init Functions In C Source Files

When programming in C, I usually like to adhere to the convention of keeping functions short and readable, especially main(). I'm updating some 8051 code, and I've noticed a previous engineer has ...
0
votes
1answer
57 views

Can this circuit validate AT89Cx051 micro if best valued components are used?

This is a circuit I made in an attempt to validate that the 20-pin microcontroller is an AT89Cx051. and the correct LED will turn on based on how much ram the chip has. While the first step is ...
0
votes
0answers
74 views

Mini Display 1.8 inch SPI TFT interface to AT89C51 microcontoller

How should I connect the 8 pins on the 1.8 inch TFT display with an AT89C51 microcontroller. This is the kind of display I have :
0
votes
1answer
203 views

Simpler code than bit banging to get multiple serial hardware working with 8051

I created a circuit like the following: I have sub-circuits that all take serial data as input and do miscellaneous processing with it. Most of the sub-circuits are just light displays. I want to ...
0
votes
0answers
49 views

Port 1.0 keeps going HIGH when I move a number to Port 1 (8051)

So I'm trying to move a hex number to Port 1, for example 2H on Port 1 should give: 00000010 but my problem is whatever number I move to Port 1(except 0H) sets Port1.0 to HIGH, I don't understand why ...
1
vote
4answers
1k views

433 MHz RF noise problems

I know this is kind of a noob question. I am trying to establish a wireless communication between two 8051 microcontrollers using a 433 MHz RF module. But since 433 MHz is a quite noisy frequency, the ...
1
vote
0answers
166 views

interfacing max30100 to 8051(I2C Communication Protocol)

I'm trying to interface heart beat sensor max30100 to 8051 for this purpose I should use i2c protocol. I'm using the following code for that but the sensor doesn't work even though i do the ...
0
votes
0answers
140 views

An analog switch controlled by digital logic

I am trying to control the movement of a remote controlled car by using a 8051 microcontroller. In the remote controller circuit there are four push buttons(forward, backward, left, right). I need to ...
1
vote
1answer
245 views

Interfacing keypad with 8051 microcontroller in Proteus

I am trying to simulate this project in Proteus using keil C. We are basically interfacing 4x4 keypad with 8051 microcontroller. This is the code for the project: ...
0
votes
1answer
46 views

Exporting data as .txt file from 8051 to PC

I am trying to first convert an analog signal to a digital using an ADC and save those data in RAM, after that I want to export this data to PC as a .txt file to print the graph in MATLAB. My question ...
0
votes
1answer
197 views

8051 24bit BCD division

I am currently working on a 8051 assembly program which receives a set of BCD inputs and calculates the mean of this set. However, I couldn't figure out a decent way to divide 24bit BCD number. For ...
1
vote
1answer
187 views

8051 Stop Mode — External Interrupt Polling?

I inherited a physical product that needs to function like this using an 8051 in STOP mode. My user manual is a little light on STOP mode, but I can't get this to work, does someone who has used ...
0
votes
1answer
131 views

instruction in 8051 assembly

I have problems understanding what does this instruction do MOV number,#(4+3)SHL(4)SHR(4) googling gave me this "operand1 SHL operand2" which is different than the instruction i wrote above . Can ...
1
vote
1answer
274 views

what does #high(434) mean [8051]

What does #high(434) actually mean I know it is some value but how do you compute the value when I debug the command mov r7,#high(434) I get 1 in register 7 why ?
1
vote
1answer
94 views

cause of half voltage on microcontroller reset pin

I have an AT89C4051 micro (powered with 5VDC) in which the reset pin is pulled down via a 100K resistor (formerly 39K) and pulled up via a 4.7uF tantalum capacitor. For simplicity, let's say a ...
1
vote
1answer
428 views

Bootloader for the 8051 MCU

First things first,I am a total newbie to the 8051 MCU. I want to get started with 8051 MCU (At89s52). I've got the compiler and all (sdcc),now all I need is a bootloader.However I can't find one,Do I ...