Hi Greg, At 01:35 PM 7/1/99 -0600, you wrote: > You guys must dread these newbie questions, so to put things in perspective, >I haven't programmed assembly since the Z80 and am truly dangerous with a >soldering iron, but hey, ya gotta start somewhere... :-) All questions >reference a 16F877... Hey, I actually like newbie questions! Since some of your questions have been completely answered before, I will only touch on a couple: > I have never done digital before... so what the heck are the caps for in >the resonator circuit? Well, digital is just analog restricted to two levels (at least in the case of binary). In the case of the oscillator, it is a purely analog circuit. Most crystals or resonators (those without internal caps, in the case of resonators) for microprocessors are designed to work with a capacitive load of a certain (manufacturer specified) amount. The value specified by the manufacturer is actually HALF of what the crystal should really see,but since you use two caps, it IS the actual value of the caps themselves. For example, if you have a crystal (or resonator, I'm pretty sure it works the same for them) that specifies a 20pF load cap,then you use TWO 20 pF caps, on on each lead,which actually gives a total of 40pF. The caps work along with the mechanical resonance of the quartz or ceramic to yield the correct resonant frequency. In addition, the caps also serve to provide phase shift. Inside the PIC, there is an inverter between the two OSC pins. An inverter provides 180 deg of phase shift, so to cause oscillation, you need to provide an additional 180 deg of shift on the output to cause a net 360 deg or 0 deg (same thing) phase shift around the whole loop. (remember,the criteria for oscillation are a net gain >= 1 and total phase shift 0 deg). Each cap acts with the resistance of the inverter and the (mechanical) inductance of the resonator, to produce about 90 deg phase shift,for a total of 180 deg. > Are the A/D's reversable to D/A? If not, how do I output to analog stuff, >such as a transister, which woulda been my "digitally controlled" power supply >answer? This depends on what you mean by "output to analog stuff". There are MANY choices here and a book could be written on microcontroller analog interfacing. IN general, you have the following options: #1) A real,external D to A converter #2) A real,internal D to A converter (not too many micros have this,IIRC, the PIC14000 does) #3) Pulse Width Modulation (PWM), sometimes feeding a low-pass filter (if clean DC is needed) #4) Simply turn on/off a transistor 1 and 2 are best when you need lots of speed and accuracy (for example, quality audio,etc.). For low quality sound effects, motor control, low-speed voltage generation, heater control,etc. you can use 3. For some things such as on/off motor control, thermostatic heater control, generating ultrasonic sonar pings, etc, 4 is just fine. After all, each output pin of a digital circuit can drive a transistor's base whose collector or emitter can be doing "analog" type stuff. > And most importantly, I need more FLASH RAM, like 256K. Ideas? FLASH RAM is not a correct term,and I am not sure what you mean. RAM is high speed memory that can be accessed many,many trillions of times without failure. FLASH is a type of EEPROM which is intended for longer term storage (such as storage of used configurable options,etc.) and can often only be written a maximum of 1 million times. It is also much slower than RAM. It is much more common to use external FLASH with something like a PIC,because you often don't need to be writting to the external memory that often (for example, a datalogger keeping records in FLASH). However, especially with PICs with larger numbers of pins, external SRAM can be used, I have done it. > How does the PIC deal with -5V for stuff like Manchester? I think you are referring to Ethernet,which uses Manchester encoding,but manchester encoding occurrs in other places, such as TV remote controls an RF coms,hence the confusion about what you meant. One way for a PIC to deal with -5v logic is to use a level converter, similar to the MAX232 idea. Regular ethernet cards have such level converters on them. However, level conversion is the least of your worries if you plan on directly interfacing a PIC to ethernet. Stuff goes by too fast on ethernet for a PIC to talk to it directly, and with a maximum frame length of about 1500,there isn't even enough ram on a PIC to hold a full frame. However, someone did post a link to an external ethernet controller chip which can be interfaced to a PIC. I can't find the link right now,but I'm sure a search of the archive at http://www.iversoft.com would find it. Try searching for Cypress, I think they made the chip. > OT: Can anybody explain why the Measurement specialities 3-axis gyro has X >and Y at 45:? This seems infuriating... I really have no idea what you mean by "at 45". Please explain. > >Thanks!!! > >Greg Hartung > | | Sean Breheny | Amateur Radio Callsign: KA3YXM | Electrical Engineering Student \--------------=---------------- Save lives, please look at http://www.all.org Personal page: http://www.people.cornell.edu/pages/shb7 mailto:shb7@cornell.edu ICQ #: 3329174 ________________________________________________________ NetZero - We believe in a FREE Internet. Shouldn't you? Get your FREE Internet Access and Email at http://www.netzero.net/download/index.html