This week involved working with the software for the hardware. We're initially given a program to run from a software application called Visual Basics. This program is left uncompleted, so my task is to finish it off and fill in the blanks, so to speak, then hopefully improve on this program. I've dealt with Visual Basics before and have never been a big fan of it. I was given the option to write the software using C programming from scratch, this would involve a lot of unknown territory for me, so I declined that offer and took the Visual Basics package.
I combed through the software, very slowly, trying to gain an understanding of what it was all about. I knew what it had to do, but seeing it in visual basics can be confusing. After some time, and a greater understanding of the task, I was ready to begin completing the program. The purpose of the program was to read and write back and forth from the PC parallel port to the hardware. This involved writing to the correct port, the status, control or data port. It also meant writing to the correct bit number of these ports. Visual basics writes in decimal, this meant finding the right bit number and write to it using the correct decimal number. I filled in the missing parts of the program with what I thought to be the correct code and hooked up my hardware to the PCs parallel port to begin testing the program.
My first problem occurred when after connecting everything together, the PC I was using wasn't set up correctly to use the software I needed. I then had to switch PCs and try again. Unfortunately, it wouldn't of mattered what PC I was using as my software code didn't seem to work the way I needed it to. The program ran fine and was able to read in 14 of my 16 switches correctly. Unfortunately, on switch 16 when pressed, the program, it seemed, would not read any change in it and on switch 15 when pressed it would read a change in both switch 15 and 16. Everything else seemed to work fine. My initial thought was that there might be a short in my switch board. So I examined that straight away. I rechecked the soldering and the continuity to make sure I hadn't damaged the board. All that seemed to be okay, so I decided to re-do the functional testing just to make sure. But I hadn't got enough time left to do this in this lab, it will have to wait until next week.
No comments:
Post a Comment