Toggle LED with push-button

Brian Griffin

Joined May 17, 2013
64
Yes I am using simulator software. I don't have microcontroller and other electronic component. There is no electronic market, where I live. I have to go for away from my place And They sell very expensive items but I will purchase very soon. I have just financial issues.
I can understand your difficulties of sourcing the components. I did have a lot of difficulties getting the components too earlier when I was a teenager, but when I entered my first year I got the components by purchasing from online retailer. Maybe you need to ask around the college or your coursemates for online retailers. I'm sure there are plenty of them where you stay. In where I stay, the local electronic component retailers are quite far away (30-40kms) so I ordered from online instead.

Depending on the simulator alone couldn't help in the push button. These requires actual components. You need to also get a modern microcontroller such as PIC16/18F and a programmer, which are available very cheap.

I did not start from using a simulator. I started with a box of electronic components with a breadboard and doing it in a semester holiday.

It is a lot of trial and error and you need to be prepared to see more failures so that you can learn faster (and more efficient).
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
Firstly, finish the first exercise.
Sorry but I am not getting your point . I did what you said. I have tested program. it toggle LED using push button. If I continuously held down push button It work,.

You said do it test with real component and I said I don't have real hardware. after that I was waiting for your reply. I was waiting for your replay. I thought I don't have real hardware. so I should move on.

Its not clear for me. What do you want me to do ?
 

MaxHeadRoom

Joined Jul 18, 2013
30,684
Toggle a LED with P.B. usually indicates it toggles with each momentary push, as previous, a simple XOR on the stored state of the P.B. does it.
I don't use C but have done often in Assembly.
Max.
 

Brian Griffin

Joined May 17, 2013
64
Sorry but I am not getting your point . I did what you said. I have tested program. it toggle LED using push button. If I continuously held down push button It work,.

You said do it test with real component and I said I don't have real hardware. after that I was waiting for your reply. I was waiting for your replay. I thought I don't have real hardware. so I should move on.

Its not clear for me. What do you want me to do ?
You need to test with real components. The forum members are not going to test the code or anything for you. They have day jobs and stuff to do. You need to test them first, and provide sufficient information on why it should/shouldn't/did/didn't work, before they are going to give you a clear feedback.

You are not going to get any reply by just waiting for the correct answer. This is not how the forum work. In these kind of things, there are no correct answer - if the system works as it should, then it is the answer.

As I have said, debouncing is a very tough topic for beginners. You might as well as start with an RC circuit first. If you need information on debouncing, Myke Predko's treatment about it in his book "Programming and customizing the PIC Microcontroller" is actually a good read. You do not have to read the code, just try to read his explaination.
 

Thread Starter

Parth786

Joined Jun 19, 2017
642
You are not going to get any reply by just waiting for the correct answer. This is not how the forum work. In these kind of things, there are no correct answer - if the system works as it should, then it is the answer.
.
That's what I wanted to ask. It's OK if they don't have time to check program. That's why I asked many time should I go for next exercise. I said before I don't have real component. I have to wait to buy real hardware. That's why I wanted to move on another topics. I don't understand what to do at such time. If I create new thread or move on next topic then forum expert think that I am not following their advice. What do I do ?

I think I should move on next topic. I have been studied LED, Switch and Push button What should be next topic. LCD, Motor or Keypad?
 
Top