Skip to content

Instantly share code, notes, and snippets.

@elktros
Created November 30, 2018 06:23
Show Gist options
  • Save elktros/3395aad49a92461514205f0b2f9b5417 to your computer and use it in GitHub Desktop.
Save elktros/3395aad49a92461514205f0b2f9b5417 to your computer and use it in GitHub Desktop.
Code for Bipolar LED Driver Circuit using 8051 Microcontroller.
#include<reg51.h>
sbit red = P0^0;
sbit green = P0^1;
sbit red_switch = P0^6;
sbit green_switch = P0^7;
unsigned char i=0;
void delay (int);
void main()
{
red=0;
green=0;
while(1)
{
if(red_switch==0)
{
green=0;
red=1;
while(red_switch==0);
}
else if(green_switch==0)
{
green=1;
red=0;
while(green_switch==0);
}
}
}
@riddhi71199
Copy link

Build started: Project: mca
Build target 'Target 1'
assembling project.asm...
C:\KEIL_V5\C51\INC\REG51.H(13): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(14): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(15): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(16): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(17): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(18): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(19): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(20): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(21): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(22): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(23): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(24): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(25): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(26): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(27): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(28): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(29): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(30): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(31): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(32): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(33): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(38): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(39): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(40): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(41): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(42): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(43): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(44): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(47): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(48): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(49): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(50): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(51): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(52): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(53): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(54): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(57): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(58): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(59): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(60): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(61): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(62): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(65): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(66): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(67): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(68): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(69): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(72): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(73): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(74): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(75): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(76): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(77): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(78): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(79): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(82): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(83): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(84): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(85): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(86): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(87): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(88): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
C:\KEIL_V5\C51\INC\REG51.H(89): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL
project.asm(10): error A9: SYNTAX ERROR
project.asm(11): error A9: SYNTAX ERROR
project.asm(13): error A9: SYNTAX ERROR
project.asm(14): error A9: SYNTAX ERROR
project.asm(15): error A9: SYNTAX ERROR
project.asm(16): error A9: SYNTAX ERROR
project.asm(18): error A9: SYNTAX ERROR
project.asm(19): error A9: SYNTAX ERROR
project.asm(26): error A9: SYNTAX ERROR
project.asm(26): error A9: SYNTAX ERROR
project.asm(27): error A9: SYNTAX ERROR
project.asm(28): error A9: SYNTAX ERROR
project.asm(29): error A9: SYNTAX ERROR
project.asm(30): error A9: SYNTAX ERROR
project.asm(31): error A9: SYNTAX ERROR
project.asm(32): error A9: SYNTAX ERROR
project.asm(33): error A9: SYNTAX ERROR
project.asm(33): error A56: UNBALANCED IF-ENDIF CONTROLS
project.asm(33): warning A41: MISSING 'END' STATEMENT
Target not created.
Build Time Elapsed: 00:00:01

These are the confronted errors.... what is to be done?

@1ajaybhai2
Copy link

Build started: Project: mca Build target 'Target 1' assembling project.asm... C:\KEIL_V5\C51\INC\REG51.H(13): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(14): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(15): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(16): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(17): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(18): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(19): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(20): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(21): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(22): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(23): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(24): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(25): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(26): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(27): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(28): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(29): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(30): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(31): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(32): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(33): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(38): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(39): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(40): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(41): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(42): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(43): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(44): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(47): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(48): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(49): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(50): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(51): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(52): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(53): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(54): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(57): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(58): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(59): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(60): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(61): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(62): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(65): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(66): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(67): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(68): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(69): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(72): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(73): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(74): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(75): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(76): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(77): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(78): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(79): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(82): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(83): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(84): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(85): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(86): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(87): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(88): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL C:\KEIL_V5\C51\INC\REG51.H(89): error A10: ATTEMPT TO DEFINE AN ALREADY DEFINED SYMBOL project.asm(10): error A9: SYNTAX ERROR project.asm(11): error A9: SYNTAX ERROR project.asm(13): error A9: SYNTAX ERROR project.asm(14): error A9: SYNTAX ERROR project.asm(15): error A9: SYNTAX ERROR project.asm(16): error A9: SYNTAX ERROR project.asm(18): error A9: SYNTAX ERROR project.asm(19): error A9: SYNTAX ERROR project.asm(26): error A9: SYNTAX ERROR project.asm(26): error A9: SYNTAX ERROR project.asm(27): error A9: SYNTAX ERROR project.asm(28): error A9: SYNTAX ERROR project.asm(29): error A9: SYNTAX ERROR project.asm(30): error A9: SYNTAX ERROR project.asm(31): error A9: SYNTAX ERROR project.asm(32): error A9: SYNTAX ERROR project.asm(33): error A9: SYNTAX ERROR project.asm(33): error A56: UNBALANCED IF-ENDIF CONTROLS project.asm(33): warning A41: MISSING 'END' STATEMENT Target not created. Build Time Elapsed: 00:00:01

These are the confronted errors.... what is to be done?

@1ajaybhai2
Copy link

Sir what is to done after this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment