> Alice wrote: > .... > >hmm, good thought. Now is there a nice way to terminate all > >those lines? i dug out some 10k sip resistors, but of course > >the 40-odd pin connector on the mchip project board is not > >set up to plug them in directly, and i have to be careful > >with port b because of b3, b6,and b7.. > >Is there an easy way to terminate all the loose lines without > >doing something to the project board i will regret later when > >it comes time to tear it out? > > sip socket with sip R in the socket. > ================= ok. i have cut in half a 40-pin dip gold-plated machine pin socket and the two halves just fit in the breakout area. > > .... > > > > list p=16F877 > > __CONFIG _CP_OFF & _WDT_OFF & _RC_OSC > >;&_LVE_OFF<--hates this > > include "P16F877.INC" > >beep_pin equ 3 > >;----------------------------------------- > > nop ;for use by ide > > ORG 0 ;Reset Vector > > ORG 4 ;Interrupt > > bsf STATUS,RP0 > > clrf PORTC ;portc set output > > movlw b'00000001' > > movwf PORTA > > movlw B'00000110';.6--magic number > > movwf ADCON1 ;??? ;TURN OFF ADC > > bcf STATUS,RP0 > > CLRF PORTA > > movlw b'00001000' > > movwf porta ;no beep here > > > > Am I missing something here, or is this code supposed to be > located inside the ISR space? [I suppose no interrupts?] > Also, what did you do with ADCON0? [I suppose it doesn't > matter here]. I couldnt see that it was required if the port is I/0. I tried putting a token one in, and it didnt make any difference. Well, if you want to be accurate, i initially confused ADCON0 with ADCON1 and took awhile to sort that out. > > I realize there are POR values in all the regs, but I always > like to initialize critical regs myself anyway [option, interrupt, > A/D, etc] - lots easier to modify them to expand the code later, > and also you don't have to remember what they POR to. > This sounds sensible. Also, it will require that i actually figure out if there are any POR settings i will regret BEFORE wasting time trying to track them down afterwards. > Also, is this all there is? Never tried a program that just > falls off the end of the PIC, usually put in an infinite loop > at end. > > L1 goto L1 Well, you dont want all the gory details, but it is part of a bigger program that isnt working on a 16f84, and is my first attempt to port to a 16f877 to debug. eventually, there is an end statement, and lots besides, including a very nice beep routine that takes the 8-bit adc reading and uses it to vary the frequency of the piezo so it tonally follows the adc input. but until i get porta going, it isnt very fun. as you know much better than me, the 877 is a lot more complicated than the f84. alice