Searching \ for 'lotsa newbie questions' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=lotsa+newbie+questions
Search entire site for: 'lotsa newbie questions'.

Truncated match.
PICList Thread
'lotsa newbie questions'
1999\07\01@154640 by Greg Hartung

flavicon
face
  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...
  What would be an appropriate crystal for a 20mhz chip for the real-seconds
discussion that's been going on?  I don't know how to get a multiplier of 5 in
base 2.  Do I have to slow down to something like 16.384Mhz?
   I have never done digital before... so what the heck are the caps for in
the resonator circuit?
  The chip has a UART, so are the MAX232's of the world simply a CMOS<->RS232
voltage transformer?
  Is serial the only sane way talk to an LCD?
  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?
  And most importantly, I need more FLASH RAM, like 256K.  Ideas?
  How does the PIC deal with -5V for stuff like Manchester?
  OT: Can anybody explain why the Measurement specialities 3-axis gyro has X
and Y at 45:?  This seems infuriating...

Thanks!!!

Greg Hartung

1999\07\01@160107 by Tim Hamel

picon face
In a message dated 7/1/99 12:46:56 PM Pacific Daylight Time, spam_OUTghartungTakeThisOuTspamADT.COM
writes:

>  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 is ONE thing I can answer. Real quick, the answer is "no"  DACs rely on
two clocks, a master (for sample rate) and another one for the serial
interface.  As far as ADCs go, well, you'll just have to pick up a copy of
Nuts and Volts, I'm writing an article on National's ADC0831. Good way to
plug my article huh? <g>


Tim H.

1999\07\01@161557 by Francisco Armenta

flavicon
face
part 0 2103 bytes content-type:text/x-vcard; charset=us-ascii; (decoded 7bit)

The way of talk whit one LCD depend of the LCD type and the LCD driver that you
can
employer

Regards
Francisco Armenta

A/D REVERSABLE TO D/A? direct not, but you can use the PWM of the PIC for genera
ted
a analog output, in Miocrochip site can find some application note of this issue
.
(http://www.microchip.com)

For un resonant circuit is important a good selection of capacitor, in the
datasheet of PIC'S s explain the range in the capacitor value for some frecuency
ranges

Greg Hartung wrote:

{Quote hidden}

Content-Type: text/x-vcard; charset=us-ascii;
name="briones.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Francisco Armenta
Content-Disposition: attachment;
filename="briones.vcf"

Attachment converted: wonderland:briones.vcf (TEXT/CSOm) (000096A0)

1999\07\01@183328 by paulb

flavicon
face
Greg Hartung wrote:

>   What would be an appropriate crystal for a 20mhz chip for the real-
> seconds discussion that's been going on?

 Try 20 MHz.  I'm puzzled.  I *think* I posted a message detailing a
real easy, concisely coded and dead-accurate approach to using even-
Megahertz crystal frequencies, but no-one has acknowledged it.  Did it
not get through or what?

>  I don't know how to get a multiplier of 5 in base 2.

 Do you mean a divisor?  A divisor is a loop which decrements a counter
each pass and when it becomes zero (the PIC has a special instruction
for this, DECFSZ as does IIRC, the Z-80), reloads the divisor value
*and* performs the "every-so-often" action.  A number is a number in
whatever base, but powers of two can be manipulated more readily as
individual bits in a binary word.

>  Do I have to slow down to something like 16.384Mhz?

 No, see above, and previous messages (in archive?).

>  I have never done digital before... so what the heck are the caps for
> in the resonator circuit?

 They're part of the tuned circuit.  See the ARRL handbook, or "The Art
of Electronics" etc...  Use the values specified by the crystal
manufacturer.  No manufacturer?  Try 15 pF.  Doesn't work?  Get a
crystal that has a manufacturer.  There's only so much you can do with
junk!

>   The chip has a UART, so are the MAX232's of the world simply a
> CMOS<->RS232 voltage transformer?

 100% correct.

>   Is serial the only sane way talk to an LCD?

 No.  In fact it's only for wimps.  If you're a wimp in this respect,
by all means go get a "Backpack" or similar assembly to play with, no
harm in that.  When you're through playing games, read the FAQs and
interface over a 4-bit bus.  You then save the cost of the EXTRA PIC or
whatever to do the serial-to-parallel interface.

 To *learn* the interface, I highly recommend using the parallel port
(using an extra card, not the one built into your motherboard) on a PC
with FORTH as the access language.  That mastered, do it in PIC.

>  Are the A/D's reversable to D/A?

 No.  D to A plus comparator = A to D, but not the other way about.

>  If not, how do I output to analog stuff, such as a transister, which
> woulda been my "digitally controlled" power supply answer?

 To perform D to A, either
1} buy a chip to do it
2} Make a R-2R network and use 8 port bits, or a shift register and
fewer bits or
3} Learn to do Pulse Width Modulation in software on a PIC output
(don't know whether 16F877 has such hardware).

 How analog is one transistor BTW?

>    And most importantly, I need more FLASH RAM, like 256K.

 Look at Atmel or Philips devices.  Out of my present field.

>    How does the PIC deal with -5V for stuff like Manchester?

 Manchester and -5V are mutually un-correlated concepts.  Care to re-
phrase?

>   OT: Can anybody explain why the Measurement specialities 3-axis gyro
> has X and Y at 45:?  This seems infuriating...

 WOT and, No.
--
 Cheers,
       Paul B.

1999\07\01@185651 by Tim Hamel

picon face
In a message dated 7/1/99 3:33:49 PM Pacific Daylight Time,
.....paulbKILLspamspam@spam@midcoast.com.au writes:

> To *learn* the interface, I highly recommend using the parallel port
>  (using an extra card, not the one built into your motherboard) on a PC
>  with FORTH as the access language.  That mastered, do it in PIC.

I couldn't agree with you more Paul!  Once I conquered it using the parallel
port (sadly, I used the onboard LPT instead of another card), it only took
about 20 minutes to implement it on a PIC (8-bit interface). If this person
(or anyone else) is a Visual Basic type person, I have source code to control
an LCD via the parallel port - schematic too!

Tim H.

1999\07\01@191700 by paulb

flavicon
face
Tim Hamel wrote:

> Once I conquered it using the parallel port (sadly, I used the onboard
> LPT instead of another card),

 Sheer curiousity, but err, *how* sad was it in your case?
--
 Cheers,
       Paul B.

1999\07\01@192529 by Tim Hamel

picon face
In a message dated 7/1/99 4:17:12 PM Pacific Daylight Time,
paulbspamKILLspammidcoast.com.au writes:

> Sheer curiousity, but err, *how* sad was it in your case?

Maybe someone can learn from this. I had a plain jane Pentium board - I don't
recall the brand. Anyways, since I'm not an EE, my design skills are poor,
aka, I have wires all over the place, with NO regards to ground (but I do
now!) or current limiting resistors. So I'll get to the point, I had this LCD
rigged up to my parallel port in 8-bit mode, I also had stray wires from the
parallel port. Well, in short, the LCD's power supply touched a pin on the
parallel port, and I heard a "SNAP!" I immediately knew what had happened,
and then I went "gulp"  That was the end of that, and I learned something --
ALWAYS keep loose pins (wires from LPT) out of the WAY!

Fried Motherboards for sale! <g> kidding...

Tim H.

1999\07\01@201518 by Lynx {Glenn Jones}

flavicon
face
Ok Here we go:

On Thu, 1 Jul 1999, Greg Hartung wrote:

>     I have never done digital before... so what the heck are the caps for in
> the resonator circuit?
Im not sure on this one, but they make the resonator resonate.

>    The chip has a UART, so are the MAX232's of the world simply a CMOS<->RS232
> voltage transformer?
Yes, MAX232's use charge pumps to convert +5V to +-10V for RS232 signal
levels

>    Is serial the only sane way talk to an LCD?
This really depends on how many lines and how much money you want to
expend. serial only takes 2, maybe 3 lines as opposed to minimum 7 lines
for parallel (this is in reference to hitachi controlled LCD's) but serial
LCD's require a second controller to convert the serial to parallel and
are thus considerably more expensive.

>    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?
No, you have to buy a DAC chip, but luckly they do exist :)

>    And most importantly, I need more FLASH RAM, like 256K.  Ideas?
if thats Kbits, then you could use a SEEPROM such as the AT24C256 or the
microchip 24C256. If thats kbytes then you can use an AT41D021 or AT41D041
(see http://www.atmel.com for specs.
>    How does the PIC deal with -5V for stuff like Manchester?
I dont know about this, but maybe a transistor and a charge pump inverter?

>    OT: Can anybody explain why the Measurement specialities 3-axis gyro has X
> and Y at 45:?  This seems infuriating...
No idea. Hope this helps.

>
> Thanks!!!
>
> Greg Hartung
>

1999\07\01@201932 by Greg Hartung

flavicon
face
I am a VB person.  Bring on the code!  What is wrong with the on-board LPT?

Tim Hamel wrote:

{Quote hidden}

1999\07\01@202556 by Lynx {Glenn Jones}

flavicon
face
The method i used was to add a 2-4 second delay each time the enable
signal changed, and thus i could look at the lines to make sure things
were hapening the way i wanted. Also, make sure you have a solid routine
that simply puts the upper then lower nibbles on the bus and toggles the
enable line as required before attempting anything else.

------------------------------------------------------------------------------
A member of the PI-100 Club:
3.1415926535897932384626433832795028841971693993751
058209749445923078164062862089986280348253421170679

On Thu, 1 Jul 1999, Tim Hamel wrote:

{Quote hidden}

1999\07\01@203853 by Tim Hamel

picon face
In a message dated 7/1/99 5:19:43 PM Pacific Daylight Time, ghartungspamspam_OUTADT.COM
writes:

> I am a VB person.  Bring on the code!  What is wrong with the on-board LPT?

Ok, I'll send the code to your personally. It's not that the onboard port is
"bad", it just saves the risk of destroying it (and possibly the board).
Would you rather destroy a WHOLE motherboard, or just a $10 ISA card?

Tim H.

1999\07\01@211659 by Greg Hartung

flavicon
face
I would not have guessed an ISA card was isolated enough not to fry the MB also
in that situation.

Tim Hamel wrote:

{Quote hidden}

1999\07\01@212329 by Tim Hamel

picon face
In a message dated 7/1/99 6:17:18 PM Pacific Daylight Time, KILLspamghartungKILLspamspamADT.COM
writes:

> I would not have guessed an ISA card was isolated enough not to fry the MB
> also
>  in that situation.
>

Well..I'm not totally sure on this, but.......if something is burned out (or
open circuited), then where does it go? Surely it won't go beyond the ISA
card.


Tim H.

1999\07\02@004550 by Sean Breheny

face picon face
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
RemoveMEshb7TakeThisOuTspamcornell.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

1999\07\02@011800 by paulb

flavicon
face
Sean Breheny wrote:

> 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 that specifies a 20pF load cap,then you use TWO 20 pF caps,
> one on each lead,which actually gives a total of 40pF.

 Eh Sean, care to have another try at that?

 The manufacturer usually specifies the parallel loading capacitance
to the crystal.  Since this is applied in practice by a capacitance to
each end, being two capacitances in series, each of these capacitances
must be *twice* the nominal load capacitance.

 *Each* actual capacitance however is composed of your external
component in *parallel* with the circuitry (inside the chip), so that
component must add to the internal (chip) capacitance to make up the
twice-load figure.  If it *happens* that the internal chip capacitance
(each of two terminals) approximates the desired capacitance, then each
of the loading capacitors will *happen* to be the same value as the
crystal load spec.

 I'd draw this, but am in a rush ;-)
--
 Cheers,
       Paul B.

1999\07\02@024906 by Michael Rigby-Jones

flavicon
face
The main problem is that the IC that does the parallel port on you mainboard
will also do both serial ports, your games port and god knows what else as
well.  If you blow it you can expect to kiss most of the usefull functions
of your motherboard goodbye.

With a separate parallel card, you aren't guaranteeing that you won't blow
the motherboard, only carefull working practices can do that.  However, you
are far less likey to damage the motherboard.  Generally any 'accidents'
will blow the output buffers on the I/O card and that will be that.  You
will be $10 poorer and you will still have a working PC.

Regards

Mike Rigby-Jones

> {Original Message removed}

1999\07\02@103428 by n.east

flavicon
face
----- Original Message -----
From: Greg Hartung <spamBeGoneghartungspamBeGonespamADT.COM>
Sent: 02 July 1999 01:19
Subject: Re: lotsa newbie questions


> I am a VB person.  Bring on the code!  What is wrong with the on-board
LPT?
>
> Tim Hamel wrote:
>

Not a lot, But if you fry the on-board LPT you waste one motherboard. Fry a
Daughter board just plug in the next one.

Neil

1999\07\02@112058 by Sean Breheny

face picon face
Hi Paul,

Yeah, I see the error of my ways <G>

I will admit to not having thought about it much before saying it. I was
going from what I thought I had learned by reading a paragraph in Mchip app
note AN588, the Oscillator Design Guide. Actually, the paragraph is
correct, it is just worded strangely (IMHO) and when I read it quickly, it
sounded to me as if the crystal actually expected TWICE its rated
capacitance, when in fact, it was saying exactly what you are saying,when I
went back and read it more carefully. The paragraph is the second one under
the section "Load Capacitors".

What you say becomes clear when you draw only one ground symbol for the two
caps,and tie their ends together, and then to GND. Then realizing that
around the whole loop from GND thru C1,including the internal OSC1 cap,thru
the xtal, down thru C2 including internal OSC2 cap,to GND again,the total
reactance must be 0.

Thanks for the correction and explanation,

Sean

At 03:16 PM 7/2/99 +1000, you wrote:
{Quote hidden}

| 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
TakeThisOuTshb7EraseMEspamspam_OUTcornell.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

1999\07\03@100221 by paulb

flavicon
face
Hello Sean.

> Yeah, I see the error of my ways <G>

 ;-)

 I'm absolutely bu****ed.  Drove to Sydney (400km) yesterday, back
today to bring my daughter home for (3 weeks) hols from Uni.
--
 Cheers,
       Paul B.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...