Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,866 members, 7,802,782 topics. Date: Friday, 19 April 2024 at 09:27 PM

Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) (7821 Views)

Data Science Tutorial For Beginners With Python Programming Language / Embedded Systems And Robotics In Nigeria / Embedded Systems: Future Of Electronics And Computer Engineering. (2) (3) (4)

(1) (2) (Reply) (Go Down)

Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 8:05am On Apr 14, 2015
You can get previous tutorials from this link… https://www.nairaland.com/2244503/embedded-systems-tutorial-beginners-experiment
and if you are new to this series tutorial you can start from the beginning… https://www.nairaland.com/2175195/embedded-systems-future-electronics-computer



EXPERIMENT 4: TRAFFIC LIGHT SYSTEM
Tools needed:
Software: Proteus 8 to simulate the software on virtual hardware, CCS compiler version 4.0 and above to write and compile programs, pickit2 IDE to burn your compiled code into your MCU
Hardware: Bread board, Red Yellow and Green LED, jumper wire, pic12f683, 3 way switch, pickit2 programmer, USB cable and power bank or USB charger to create 5v supply. All the hardware components can be gotten from a reputable Electronics Component supplying company http://hub360.com.ng/shop-2/hub360-pic-starter-kit/

Overview: The fourth experiment for this series of tutorial is the Traffic light system. We are now moving from simple projects to an intermediate and more tasking one.
Traffic light system is a system used to control movements of vehicles and human on the road. It is always installed at strategic locations where vehicles coming from a particular lane or road intersect another. Traffic lights are also installed to location where pedestrians wants to cross the road, especially little school children. As we all know, traffic light has only three color signs; red which represents STOP, yellow which represents READY and green which represents GO. Modern traffic light now comes with countdown timer which tells the motorist the time left to GO or STOP. Modern traffic light systems are very complex system and sophisticated, some involves artificial intelligence which can make fast decision by itself on which lane to PASS and which to STOP at general and specific conditions, and respond to priority change and override.
There are two major categories of traffic light system. The open loop traffic system and the closed loop traffic system. Open loop is when the “go time” and “stop time” is fixed and the time allocated is not in any way determined by the weight of traffic. Closed loop traffic system is one that the time allocated is not fixed but is determined by the weight of traffic. Modern traffic light system is closed loop type; it is either controlled by an artificial intelligence robot or a traffic warden or from a control room in a remote location via wireless technology.
For the sake of this tutorial for beginners we are going to restrict ourselves to an open loop two ways traffic system without counter just for simplicity then later we can do a closed loop with countdown timer when we have reached intermediate or professional level. However even in this level we can modify our code to do a semi-closed loop; how do I mean… a semi-closed loop system in this context is a system where by different portion of code will be created to cater for heavy traffic, intermediate and light traffic, these code can be selected by using a switch. More explanation will be made later in this tutorial

OPEN LOOP TRAFFIC LIGHT SYSTEM: In a two way traffic light system, when the light stops a lane, it passes the other lane and vice versa. So what we actually need is one circuit which will control the two traffic light system. The red light of a lane will be connected to the green light of the second and vice versa, both yellow lights are connected together. To achieve this all we need is to send 3-bit number which will represent the 3 light to the port of the microcontroller and to delay the output for some few seconds. We send “1” to the port which represents RED or STOP, we delay for the number of times we want then send “3” which will still activate the RED light and also switch on the YELLOW for READY and we delay it for the time we want. Then we send “4” which deactivates both red and yellow light and switch on the GREEN for a GO and we also delay the output, then the program moves to the top. The state table below explains more.

FULL TEXT OF THIS ARTICLE IS IN THE DOC FILE ATTACHED TO THIS POST

CLOSED-LOOP TRAFFIC LIGHT SYSTEM:
As we have discussed above, a closed-loop system is one that has a feed back to control the time allocated to a particular lane of the traffic. The feedback system can be a human e.g. a traffic warden or it can be automated i.e. sensors are installed at strategic locations to determine weight of traffic and allocate time as set by the designer of the system and specification given. In this tutorial, we will be doing what I personally called a semi closed-loop system. It will have 3 way switch for the user to switch between heavy, intermediate and light traffic conditions. The reason why it is not a full closed loop system is that it has only 3 conditions which in the real world, millions of condition exist.
Even with these 3 conditions a good project can still be done. Take for example at Abule-egba traffic light junction: early in the morning, the vehicles coming from Sango to Iyana-ipaja and Agege is much thereby making the traffic heavy but the vehicles coming from Iyanapa going to sango is few, in such case, we can assign 60 seconds “GO” and 20 seconds “STOP” to where there is heavy traffic which will amount to 20 seconds GO and 60 seconds STOP to the other side. In the afternoon the traffic is intermediate so we can assign 20 seconds to both sides. Then the evening is a reverse effect of the morning so we assign more traffic to vehicles going to sango. But remember that there are exceptional cases which is not included in these 3 sets of conditions, and that is what makes it a semi-closed-loop system.
In writing the program, we will be using a new syntax which is used to read the logic state on a switch, and along side, we will be suing “if” conditional statement. You can pick up a C programming ebook for more understanding of conditional statements.
There are so many approach we can use to write this code and get the same result, using functions, switch statements etc but the approach I will like to use for a beginner is the if-goto approach. Switch 1 will be for heavy “more traffic at lane 1”, switch 2 will be for “balance” switch 3 will be for “more heavy traffic at lane 2”. So the algorithm will be as follows:
1. Start
2. Initialize ports and internal registers and delays.
3. Read switch 1 if logic(1) is detected goto 6 else continue with 4.
4. Read switch 2 if logic(1) is detected goto 7 else continue with 4.
5. Read switch 3 if logic(1) is detected goto 8 else goto 3.
6. Do “heavy traffic” and goto 3.
7. Do “intermediate” and goto 3.
8. Do “light traffic” and goto 3.
9. end
CIRCUIT DIAGRAM...

FULL TEXT OF THIS ARTICLE IS IN THE DOC FILE ATTACHED TO THIS POST

THE SOURCE CODE, PROTEUS SIMULATION AND HEX FILE IS IN A RAR FILE ATTACHED TO THIS POST


WATCH OUT FOR THE NEXT TUTORIAL

Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Savotech: 8:36am On May 01, 2015
Woow, this is a good final year project, especially that closed loop system u talked about
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by iamnaf(m): 3:11pm On May 10, 2015
guassian please i will like to ask you some questions concerning embedded programming and microcontroller. i have sent you a pm. my mail is nafsulaiman@gmail.com
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 3:29am On May 11, 2015
nice thread

1 Like

Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by harryobas: 10:21pm On May 14, 2015
Savotech:
Woow, this is a good final year project, especially that closed loop system u talked about
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by harryobas: 10:23pm On May 14, 2015
guassian:
You can get previous tutorials from this link… https://www.nairaland.com/2244503/embedded-systems-tutorial-beginners-experiment
and if you are new to this series tutorial you can start from the beginning… https://www.nairaland.com/2175195/embedded-systems-future-electronics-computer



EXPERIMENT 4: TRAFFIC LIGHT SYSTEM
Tools needed:
Software: Proteus 8 to simulate the software on virtual hardware, CCS compiler version 4.0 and above to write and compile programs, pickit2 IDE to burn your compiled code into your MCU
Hardware: Bread board, Red Yellow and Green LED, jumper wire, pic12f683, 3 way switch, pickit2 programmer, USB cable and power bank or USB charger to create 5v supply. All the hardware components can be gotten from a reputable Electronics Component supplying company http://hub360.com.ng/shop-2/hub360-pic-starter-kit/

Overview: The fourth experiment for this series of tutorial is the Traffic light system. We are now moving from simple projects to an intermediate and more tasking one.
Traffic light system is a system used to control movements of vehicles and human on the road. It is always installed at strategic locations where vehicles coming from a particular lane or road intersect another. Traffic lights are also installed to location where pedestrians wants to cross the road, especially little school children. As we all know, traffic light has only three color signs; red which represents STOP, yellow which represents READY and green which represents GO. Modern traffic light now comes with countdown timer which tells the motorist the time left to GO or STOP. Modern traffic light systems are very complex system and sophisticated, some involves artificial intelligence which can make fast decision by itself on which lane to PASS and which to STOP at general and specific conditions, and respond to priority change and override.
There are two major categories of traffic light system. The open loop traffic system and the closed loop traffic system. Open loop is when the “go time” and “stop time” is fixed and the time allocated is not in any way determined by the weight of traffic. Closed loop traffic system is one that the time allocated is not fixed but is determined by the weight of traffic. Modern traffic light system is closed loop type; it is either controlled by an artificial intelligence robot or a traffic warden or from a control room in a remote location via wireless technology.
For the sake of this tutorial for beginners we are going to restrict ourselves to an open loop two ways traffic system without counter just for simplicity then later we can do a closed loop with countdown timer when we have reached intermediate or professional level. However even in this level we can modify our code to do a semi-closed loop; how do I mean… a semi-closed loop system in this context is a system where by different portion of code will be created to cater for heavy traffic, intermediate and light traffic, these code can be selected by using a switch. More explanation will be made later in this tutorial

OPEN LOOP TRAFFIC LIGHT SYSTEM: In a two way traffic light system, when the light stops a lane, it passes the other lane and vice versa. So what we actually need is one circuit which will control the two traffic light system. The red light of a lane will be connected to the green light of the second and vice versa, both yellow lights are connected together. To achieve this all we need is to send 3-bit number which will represent the 3 light to the port of the microcontroller and to delay the output for some few seconds. We send “1” to the port which represents RED or STOP, we delay for the number of times we want then send “3” which will still activate the RED light and also switch on the YELLOW for READY and we delay it for the time we want. Then we send “4” which deactivates both red and yellow light and switch on the GREEN for a GO and we also delay the output, then the program moves to the top. The state table below explains more.

FULL TEXT OF THIS ARTICLE IS IN THE DOC FILE ATTACHED TO THIS POST

CLOSED-LOOP TRAFFIC LIGHT SYSTEM:
As we have discussed above, a closed-loop system is one that has a feed back to control the time allocated to a particular lane of the traffic. The feedback system can be a human e.g. a traffic warden or it can be automated i.e. sensors are installed at strategic locations to determine weight of traffic and allocate time as set by the designer of the system and specification given. In this tutorial, we will be doing what I personally called a semi closed-loop system. It will have 3 way switch for the user to switch between heavy, intermediate and light traffic conditions. The reason why it is not a full closed loop system is that it has only 3 conditions which in the real world, millions of condition exist.
Even with these 3 conditions a good project can still be done. Take for example at Abule-egba traffic light junction: early in the morning, the vehicles coming from Sango to Iyana-ipaja and Agege is much thereby making the traffic heavy but the vehicles coming from Iyanapa going to sango is few, in such case, we can assign 60 seconds “GO” and 20 seconds “STOP” to where there is heavy traffic which will amount to 20 seconds GO and 60 seconds STOP to the other side. In the afternoon the traffic is intermediate so we can assign 20 seconds to both sides. Then the evening is a reverse effect of the morning so we assign more traffic to vehicles going to sango. But remember that there are exceptional cases which is not included in these 3 sets of conditions, and that is what makes it a semi-closed-loop system.
In writing the program, we will be using a new syntax which is used to read the logic state on a switch, and along side, we will be suing “if” conditional statement. You can pick up a C programming ebook for more understanding of conditional statements.
There are so many approach we can use to write this code and get the same result, using functions, switch statements etc but the approach I will like to use for a beginner is the if-goto approach. Switch 1 will be for heavy “more traffic at lane 1”, switch 2 will be for “balance” switch 3 will be for “more heavy traffic at lane 2”. So the algorithm will be as follows:
1. Start
2. Initialize ports and internal registers and delays.
3. Read switch 1 if logic(1) is detected goto 6 else continue with 4.
4. Read switch 2 if logic(1) is detected goto 7 else continue with 4.
5. Read switch 3 if logic(1) is detected goto 8 else goto 3.
6. Do “heavy traffic” and goto 3.
7. Do “intermediate” and goto 3.
8. Do “light traffic” and goto 3.
9. end
CIRCUIT DIAGRAM...

FULL TEXT OF THIS ARTICLE IS IN THE DOC FILE ATTACHED TO THIS POST

THE SOURCE CODE, PROTEUS SIMULATION AND HEX FILE IS IN A RAR FILE ATTACHED TO THIS POST


WATCH OUT FOR THE NEXT TUTORIAL

Hi just had a quick glance at your source code and expected to see an infinite while loop in your main() function as this seems to be the norm in most embedded real-time software architectures. Also, i think it would be more efficient to use interrupts for handling inputs rather than having software continually poll the hardware -- which wastes CPU time.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Savotech: 6:43am On May 16, 2015
harryobas:

Hi just had a quick glance at your source code and expected to see an infinite while loop in your main() function as this seems to be the norm in most embedded real-time software architectures. Also, i think it would be more efficient to use interrupts for handling inputs rather than having software continually poll the hardware -- which wastes CPU time.


With my own little experience, I think he used start and goto start instead of the infinite while loop what serves the same purpose. And as we can see the code worked perfectly.

I have read about interrupts.they r little bit complex for beginner and are used only when the application is time bound or does so many work. I have read many PIC programming book and what they used for reading input button is not an interrupt except except 4x4 keypad which they used portB interrupt. So i think guassian is on the right track. Another thing i notice is that the PIC12f683 he used does not have an external interrupt function.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 7:07am On May 16, 2015
goto is not a good C language function. It is not recommended, instead use while(1) endless loop.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Savotech: 7:37am On May 16, 2015
princejude:
goto is not a good C language function. It is not recommended, instead use while(1) endless loop.

Well, i really dont know why he used got i stead of while. I believe when he comes online he will explain himself.

But that goto is not a good C language function is what i cannot agree with u cos i use it a lot too.
When i am working on a function that calls another function recursively, of course the compiler will give u recursion error so i use goto statement to control the program flow.

Using CCS compiler, do u know that the compiler give a warning whenever u use while(1)? Not that it is wrong to use it but reminds u that u r using a constant as the arguement instead of a variable. That means that the main purpose of a while loop is not for a constant to be passed in as arguement but a variable, but we can always trick the compiler to pass in a constant which is an unchanging variable.

So i dont think using a goto function is is a bad programmimg practice if u really know what u r doing.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by bot101(m): 8:03am On May 16, 2015
Using goto in traditional programming is is bad practices as it confuses the programmer and others when trying to read the program after a while or after major modifications, but in embedded programming where programs are usually light and straightforward, they are a standard practice.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 9:29am On May 16, 2015
Savotech:


Well, i really dont know why he used got i stead of while. I believe when he comes online he will explain himself.

But that goto is not a good C language function is what i cannot agree with u cos i use it a lot too.
When i am working on a function that calls another function recursively, of course the compiler will give u recursion error so i use goto statement to control the program flow.

Using CCS compiler, do u know that the compiler give a warning whenever u use while(1)? Not that it is wrong to use it but reminds u that u r using a constant as the arguement instead of a variable. That means that the main purpose of a while loop is not for a constant to be passed in as arguement but a variable, but we can always trick the compiler to pass in a constant which is an unchanging variable.

So i dont think using a goto function is is a bad programmimg practice if u really know what u r doing.

If CCS compiler warns you when you use while(1), then use while(true). goto may work in C language but it is not recommended.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 12:52pm On May 16, 2015
Woow... I am impressed. You guys have said it all. Actually, sometimes I use GOTO and while interchangeable when working with simple programs like this traffic light but when working with large program I use WHILE for endless loop and it makes it easily edittable if i decide to add some conditional statement to it.

Sincerely, i decided to use the GOTO just for a beginner out there to easily understand. GOTO is more easy to process logically for a layman than WHILE. but in the actual sense the do the same thing as to provide an endless loop for programs.

Using GOTO will require the developer to create a unique name label which may be too cumbersome if he has to create multiple of it but using WHILE, same while(1); is used anywhere in the program.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 12:54pm On May 16, 2015
About using interrupt...

Savotech:

I have read about interrupts.they r little bit complex for beginner and are used only when the application is time bound or does so many work. I have read many PIC programming book and what they used for reading input button is not an interrupt except except 4x4 keypad which they used portB interrupt. So i think guassian is on the right track. Another thing i notice is that the PIC12f683 he used does not have an external interrupt function.


Savotech has said it all.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by harryobas: 3:22pm On May 16, 2015
@Guassian

pls one quick question about concurrency in embedded systems software in general. Looking at your source code, it is clear that you have adopted a sequential approach to data acquisition by reading each pin one after the other as illustrated in the start section of you code. Just wanted to know how you would approach a scenario where input changes are happening concurrently. In this kind of situation, the sequential approach to data acquisition simply does not work and since there is no kernel to provide units of concurrency such as threads/tasks, i just think it would be quite a hideous task for the programmer to provision code for concurrency in addition to normal application code.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 4:25pm On May 16, 2015
harryobas:
@Guassian
pls one quick question about concurrency in embedded systems software in general. Looking at your source code, it is clear that you have adopted a sequential approach to data acquisition by reading each pin one after the other as illustrated in the start section of you code. Just wanted to know how you would approach a scenario where input changes are happening concurrently. In this kind of situation, the sequential approach to data acquisition simply does not work and since there is no kernel to provide units of concurrency such as threads/tasks, i just think it would be quite a hideous task for the programmer to provision code for concurrency in addition to normal application code.

Concurrency can be achieved by using a real time operating system RTOS which has the kernel for effective management of IO port. RTOS is efficient and effective in MCU that has high processing power, RAM, ROM etc. RTOS is very complex method of programming but something similar to that is achieved in smaller MCU using a time division multiplexing in which the cpu does the job(s) fast enough to detect any input change in multiple input system and produce information in multiple output system.

In other words, Using a multiple input system requires the cpu to be fast enough to give attention to all the inputs. For example, the cpu can poll data from a push button input system with a period of 10 microseconds. This poll rate is even enough to detect up to 10000 buttons.

So concurrency can be achieved to a large extent using speed MCU. And also depends on how the developer can effectively manage CPU resource time and sharing.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by harryobas: 5:04pm On May 16, 2015
guassian:



Concurrency can be achieved by using a real time operating system RTOS which has the kernel for effective management of IO port. RTOS is efficient and effective in MCU that has high processing power, RAM, ROM etc. RTOS is very complex method of programming but something similar to that is achieved in smaller MCU using a time division multiplexing in which the cpu does the job(s) fast enough to detect any input change in multiple input system and produce information in multiple output system.

In other words, Using a multiple input system requires the cpu to be fast enough to give attention to all the inputs. For example, the cpu can poll data from a push button input system with a period of 10 microseconds. This poll rate is even enough to detect up to 10000 buttons.

So concurrency can be achieved to a large extent using speed MCU. And also depends on how the developer can effectively manage CPU resource time and sharing.

From the concurrency options you have enumerated it is clear that the RTOS approach to concurrency is much more cleaner and efficient since it frees the developer from having to worry about application independent functionality such concurrency. While on the issue of RTOS, another question i would like to ask relates to the issue of portability. if a program is written for a particular RTOS can the program be migrated between two different MCUs from different manufacturers both running that particular RTOS without any form of modification?
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 9:02pm On May 16, 2015
harryobas:

From the concurrency options you have enumerated it is clear that the RTOS approach to concurrency is much more cleaner and efficient since it frees the developer from having to worry about application independent functionality such concurrency. While on the issue of RTOS, another question i would like to ask relates to the issue of portability. if a program is written for a particular RTOS can the program be migrated between two different MCUs from different manufacturers both running that particular RTOS without any form of modification?

U see, program portability is one of the problems of Embedded system development. Code written for a PIC microcontroller is not compatible with AVR and the likes. This is the reason why many developer stick to only one or two type of microcontroller when they have mastered d architecture.

The summary of this is that RTOS code cannot be migrated between two MCU of different families or architecture, nothing of such exist as far as i know, I stand to be corrected though.

The solution i have thought of to this is for IEEE to gather various compiler development companies to create one giant compiler that will have a common syntax and resource management across all various types of microcontroller, so that a syntax written for a MCU will work for the other.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 11:30am On May 23, 2015
For latest Embedded System Design News
Like our page at www.facebook.com/JutronixEmbededLtd

And follow us @jutronix. www.twitter.com/jutronix

Training comming soon in Enugu
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by JavaPrince1(m): 2:04am On May 24, 2015
princejude:
For latest Embedded System Design News
Like our page at www.facebook.com/JutronixEmbededLtd

And follow us @jutronix. www.twitter.com/jutronix

Training comming soon in Enugu
Really nice....Hope the fees will be affordable.
NICE IDEA
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 7:53am On May 29, 2015
Arduino Workshop LIVE in Enugu 12th June. Don't miss it...
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by elantraceey(f): 10:03pm On Jul 03, 2015
Following keenly , Starting from the beginning.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 11:17am On Sep 04, 2015
September Arrivals

ISD1820 Voice Recording Module
TDA2030 Amplifier Module
W5100 Ethernet Shield
9 Pin 10k A09-103 Resistor pack
8 Channel Relay module
microSD Card Module
CP2102 USB-TO-TTL
L7805CV
ST Link V2
STM32F103C8T6 ARM Minimum Board
Electronic Door Lock
MB-102 (830 Point) Bread Board
20cm Dupont male – female
20cm Dupont male – male
GPS Receiver
MG995 Metal Gear Servo
MG90S Metal Gear Mini Servo
SG90 Mini Servo
Stepper Motor with ULN2003 motor driver board
LM35 Temperature Sensor
HLK-PM01 AC-DC 220V to 5V mini power supply
RFID NFC PN532 Shield
MLX90614 Contactless Temperature Sensor Module
DHT11 Temperature And Relative Humidity Sensor Module
Servo Pan/Tilt Anti-Vibration Camera Mount
Kinsten Positive Acting Presensitized Single-sided PCB PP1015 (10×15)cm x 1.6mm
Kinsten Positive Acting Presensitized Double-sided PCB PP1015 (10×15)cm x 1.6mm
FR4 PCB Single Side Copper Clad Board. 70 x 100 x 1.5 mm
FR4 PCB Double-Side Copper Clad Board, 150 * 100 * 1.6 mm
1W Zener diode 3.3v -30V
DIY KIT GSM GPRS 900 – 1800 MHz Short Message Service SMS module
Robotic Arm
MQ-137 Ammonia Gas Sensor
PH Level Sensor Module
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by hopefullman: 9:07pm On Jun 22, 2016
guassian:
Woow... I am impressed. You guys have said it all. Actually, sometimes I use GOTO and while interchangeable when working with simple programs like this traffic light but when working with large program I use WHILE for endless loop and it makes it easily edittable if i decide to add some conditional statement to it.

Sincerely, i decided to use the GOTO just for a beginner out there to easily understand. GOTO is more easy to process logically for a layman than WHILE. but in the actual sense the do the same thing as to provide an endless loop for programs.

Using GOTO will require the developer to create a unique name label which may be too cumbersome if he has to create multiple of it but using WHILE, same while(1); is used anywhere in the program.
can u please re-upload the code and document. I'm unable 2 download it. Thanks
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by guassian: 10:16pm On Jun 23, 2016
hopefullman:
can u please re-upload the code and document. I'm unable 2 download it. Thanks

I tried to download it myself, and it was successful but nevertheless...

Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Talkwisdom(m): 8:15am On Jul 24, 2016
guassian:


I tried to download it myself, and it was successful but nevertheless...
Hello Guassian,

where do you base currecntly,i would like to meet with you,,,
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Damoxy(m): 10:42pm On Jul 27, 2016
evening,pls I need a link to a tutorial video or pdf for basics of emdedded C for 8051
for a begineer
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 1:51pm On Jul 28, 2016
New items in store...
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by tr3y(m): 10:07pm On Jul 28, 2016
This is interesting, I understand the concept though I am more into web programming.

I might switch to this real soon. Impressive.

Thumbs up OP
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Talkwisdom(m): 12:51am On Aug 03, 2016
princejude:
New items in store...

Dear Prince,

are you guys done with the training on embedded system in Enugu?
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by princejude(m): 5:31pm On Aug 06, 2016
Talkwisdom:


Dear Prince,

are you guys done with the training on embedded system in Enugu?
Anytime you are ready for any embedded system design training or kits and sensors sourcing, just contact us.
Re: Embedded Systems Tutorial For Beginners:experiment 4 (traffic Light System) by Talkwisdom(m): 10:57pm On Aug 06, 2016
princejude:

Anytime you are ready for any embedded system design training or kits and sensors sourcing, just contact us.

i would like to start the training by month end,

where is your office located in ENUGU?

(1) (2) (Reply)

Exclusive Team Python Forum / How Can I Generate Phone Numbers / Who Have Attended Moat Academy Software Bootcamp Training Before?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 95
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.