| ??? 04/15/00 16:56 Read: times |
#2224 - Also Programing Style: |
Hi Babar,
There are different methods of programming. But please watch, the micro was a stupid machine and every chance to wrong execution he use it only, when the disadavantage was the biggest (Murfis law). So on your example IR decoding you know not, how exact you on the real timing conditions. So, if a butterfly starts to fly in Japan, the temperature in your country increase about one ppm of a degree and the crystal of your micro was 1 cycle slower per second, wich can cause a wrong detection of the IR code. This trial and error give you always incertain results. So, if you know not the remote control unit, you must write a program to determine first the exact timing condiditions. And only than you can set the detection threshold in the middle of the measured bit time for the maximum of reliability. But there also some reasons to use succesful trial and error methods. E.g. if you found the real timing, you can give out the key code over the UART and can press every key to detect the real key code. This trial and error give you an exact result and leave no secret unsolved. And so is no chance for wrong working. Means, if after succesful trial and error all secrets are solved, only than trial and error can be used. In my own practice I prefer and develop circuits with fast download and I develop with small steps and test it immediately. I admire developers, which can write code over 10 day before they try to execute it. In oppositoion I consume some times more to download, but I think, I save many times more, since on little changing its many times easier to detect the errorios code piece. And also I agree, with all others, the 3 importand point are reliability, reliabilty and reliability. Maintainability was also good for you to reuse your own work some months later. Its not a shame to comment every single code line. There are words in the data sheets, like "worst case conditions". At first it looks spite, but watching it all, increase success impressively. Peter |
| Topic | Author | Date |
| Also Programing Style: | 01/01/70 00:00 | |
| RE: Also Programing Style: | 01/01/70 00:00 | |
| RE: Also Programing Style: | 01/01/70 00:00 | |
| RE: Also Programing Style: | 01/01/70 00:00 | |
RE: Also Programing Style: | 01/01/70 00:00 |



