At first, although it compiled fine, I was stumped how to configure the chips. It turned out to be my own error - i'd modified the example program, which meant that since I hadnt started a new project, it didnt bring up the configuration window! Once i'd found that out, I could set the internal oscillator as we wanted. Next, I found that the Mikroelektronica software is not directly compatible with the MPLAB PICkit2. I had to find where it stored the .hex files and import them.
Ok, so our program isnt going to win any coding awards! -
its just a simple LED traffic lights sequence. And it took me a couple of hours to fathom turning the Port A analog comparitors off! But the point is that between us, Sam and I coded this without any help, and it works!
From now on, I will let Sam work the necessary programming out to improve the project. His next task is to add a second set of LEDs, following the reverse sequence - essentially a set of roadworks traffic lights! Oh, and to get a flashing amber!
No comments:
Post a Comment