Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hi I am completely new to embedded C programming. In college I have being given the task of programming a pic 18f4620 to switch an LED on and off, simple as that. I really have no clue where to start, we were provided with an example code that just turned the LED on and off with a slight delay that can be adjusted, all inside an infinite loop. I need to modify this programme to include a sitch to turn the LED on and off. I was told things like instead of using LATD use PORTD and also to include a TRISD command in the code but I have no idea what to do from how to connect the switch into the pic to even getting started with the code. Any help would be greatly appreciated