I wrote few days ago: > Now all is working fine, but-t-t start - up time got > unacceptable: first 16F871 - 4.4 s, second - 6.3 s. > The same code working with I/O ports and RS-232 > through ICL-232, the same config word "3FFE", > the same boards and crystals, only PICs are changed > and all these resulted in different damned start - up > times 4 - 6 seconds. (The time between Power-Up > moment and when PIC starts to send repeatedly > bytes (250 bytes per second) to PC. I monitor it with > a scope.) Olin Lathrop replied: > All these are long shots, but here goes in random > mind-blurt order: ... I wrote later: > Thanks, > I was about to blame these guys who sold me chips. > Really, I don't use CCP and other extra stuff, rather > simple code is within one bank. > After your post, I begun to suspect things are not so > simple. So I wrote a small program to toggle Port B 0 pin. > It started normally, I checked it with the scope. So oscillator > matters are out of the game as well as MCLR etc, I think. > I'll look through the program these days.(PICing is my hobby). I checked my code. And ... Yes!.. there is a bug. I forget to initialize one register. The register is a counter 1 to 16 for some loop. In previous chips (16F874) the register's values on Power On were between 1 - 16, so the program started to send bytes instantly. In last chips (16F871) the register's values on Power On were somewhat higher then 16, so there were some " dead" period during which the register (counter) was decrementing to value 16. So, the List (in the person of Olin) saved me from the awkward situation. (I was about to blame local Mchip guys, for they sold me not-so-good chips). Thanks. Olin Lathrop wrote (other thread): > There are many educational computer games out there. > Some directly target a particular skill like arithmetic... Thank you for your response. Mike. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu