No exact or substring matches. trying for part
PICList
Thread
'picstart hardware fix for eedata (?)'
1995\08\19@115232
by
john r reid
|
I was dissapointed to find that the picstart programmer was incapable of
programming the data memory on a 16c84. (or at least so I'm told by my
microchip rep.)
As I have not yet seen a serial mode programmer designed for the mac I
had an Idea that may work in hardware.
Looking at the programming spec in the databook, all that appears to be
different between programming "programme". and data memory is the need
to set RB0 to 1 during the control word.
I assume that if that is done the picstart and mps16b software will
think it is programming prog memory while it is actually reading/writing
from the data memory. I'm not quite sure what happens when it tries to
write/read addresses above 40h but lets not worry about that just yet.
I believe that a simple circuit;
RB7 ->[inverted] ->
[AND]-> [DIODE]-> RB0
RB2 ->[XOR]------->
RB3 ->[ ]
would give the logic required, that is RBO forced to one when a "load
data" or "read data" instruction is sent to the chip. At all other times
I assume the diode woold look like a high impedence to 0, and not effect
the programmer to chip traffic.
Before I try this and blow everything up, I invite comments.
a) good idea, might work.
b) good idea, will not work.
c) why bother when there is a much better way of doing it.(remember this
needs to work on a mac, and I do not want to buy a more expensive
programmer!)
All feedback in these catagories appreciated.
(As I have not tried it out, please do not destroy your own picstarts.)
john
'New PIC Hardware tips and tricks on the web'
1995\09\14@214805
by
Eric Smith
I've added a new "Hardware tips and tricks" to my PIC page, along with one
new PIC project description, the Automatic O.J. Muter.
There are only four hardware tips and tricks listed so far, but I have
several more items in progress.
The URL is currently
http://www.telebit.com/~eric/pic/
although it is likely to change by the end of the month.
Eric
1995\09\14@235347
by
John Payson
|
> I've added a new "Hardware tips and tricks" to my PIC page, along with one
> new PIC project description, the Automatic O.J. Muter.
>
> There are only four hardware tips and tricks listed so far, but I have
> several more items in progress.
>
> The URL is currently
> http://www.telebit.com/~eric/pic/
> although it is likely to change by the end of the month.
Your page was very interesting...
[1] PIC-PONG: I was thinking of doing this on the 87751 in response to
Phillips' design contest, but decided it wasn't likely to win so I
didn't bother; since then I thought of doing a high-quality PIC-based
test pattern generator [REAL NTSC-format video]. I would have used
a counter to divide the clock by 4, a few simple resistor-based DACs,
and a 4051 driven by PB7 and the two counter bits. This would thus
allow 14.1818MHz resolution though most patterns would repeat rather
a lot. :-)
[2] Caption decoder: I designed a caption encoder/decoder using two 22v10's,
an 8751, 62256, 2102, 1881, 311, 4089, and a Max 454 [someone else did
the analog part, but I did the digital]. I think in retrospect I maybe
should have used more logic and less code since code maintenance was a
real pain. Your design sounds somewhat interesting.
[3] Lobotomouse: A friend of mine wanted to play Arkanoid on his Amiga, using
real Paddle controllers; I wrote a VIC-20 program to translate pot moves
into quadrature actions. :-)
[4] Whirlessgig: There was a toy entitled the Skywriter which did what you
describe, including a directional switch. One toy I was planning to
produce as a magazine contest entry would be a mini LED display board
[14x5 lights] using an 18-pin PIC and no other chips; don't know if the
unit would be bright enough, but the chip count would be somewhat neat
if it worked [can you figure out how to wire those? :-)]
[5] Sine/Cosine tricks: In many applications it's necessary to vary the
amplitude of a sine wave. Rather than multiplying the waveform values
by the desired amplitude, it is sometimes more convenient to add two
sinewaves phase-shifted by an amount depending upon the desired ampli-
tude [e.g. 180 degrees for zero amplitude, 0 degrees for full aplitude].
'How to build a dongle (hardware lock)'
1996\05\08@103235
by
Greg Marchokov
Hello PICers. This is my first pic project (first project at all).
I must build a dongle (hardware lock) attached to LPT. So I have some
questions.
1. Is there any standard for fardware locks.
2. Is there design I can follow in my work.
3. How I can power the chip (CENTRONICS doesn't have +5V line)
Any ideas ? I would appreciate any advise. Thanks,
Greg
P.S. I have only mailftp access.
------------------------------------------------------------------------
Greg Marchokov Mail to: spam_OUTgimarTakeThisOuT
bgtus4.vmei.acad.bg
Technical Universety - Sofia
8 Rilska street,
Bulgaria, Assenovgrad
1996\05\08@114751
by
Thomas Coonan
|
> 2. Is there design I can follow in my work.
Might look into P/N Sequences.. Individual dongles implement VERY large
P/N counters (huge shift registers, where the XOR taps create a particular
P/N sequence that is 2^N where N is very large. Same idea as Psuedo-random
generators). Software sends a signal to dongle requesting validation,
dongle sends back next value in its sequence. Software (if it has correct
polynomial (e.g. the password/key) and same P/N sequence) must respond with next
element sequence. If it doesn't, I imagine dongle should freeze for 2 seconds..
position in sequence must be stored in NV memory. I don't know if this is what
real dongles do, there is a real good book out there, something like "Practical
Encryption..."...
> 3. How I can power the chip (CENTRONICS doesn't have +5V line)
>Any ideas ? I would appreciate any advise. Thanks,
Parasitically pull power from one of the data pins?.. Same trick folks
use to self-power RS232 devices from one of the RTS/CTS lines...
.....Thomas.CoonanKILLspam
@spam@Sciatl.com
1996\05\08@124956
by
rdmiller
On Wed, 8 May 1996, Thomas Coonan wrote:
[...]
> I don't know if this is what real dongles do, there is a real
> good book out there, something like "Practical Encryption..."...
Maybe you mean, _Applied Cryptography_ by Bruce Schneier.
I've got the first edition (ISBN 0-471-59756-2),
but I've heard that there is a more recent edition.
You can contact Bruce at schneier
KILLspamchinet.com, or
voice: +1 708 524 9461, or FAX: +1 708 524 8070.
(I have no personal affiliation with Bruce, nor
with Counterpane Systems, other than having
contributed slightly to debugging his book...
and debugging the book's errata list!)
Rick Miller
1996\05\09@072244
by
Thomas Coonan
Coincidentially, another PICLIST thread is discussing Dallas Semiconductor
parts as a way to remotely monitor switches. In the same Data Book are
dongle building blocks..
I find Dallas Semiconductor parts to be quite clever little devices. Their
Data Books are worth a read-through, especially the Automatic Identification
book.
.....Thomas.CoonanKILLspam
.....Sciatl.com
1996\05\09@080710
by
Mohamad Shalan
let me know ! if u got anything
1996\05\09@100732
by
Keith Dowsett
|
>let me know ! if u got anything
A friend of mine took a look at building an Autocad dongle. The logic behind
it was (at the time) fairly simple but even a 10MHz processor worked an
order of magnitude slower than the dongle. I suppose if you had access to
gate arrays you might make one run fast enough.
I guess that with the wider availability of 'hard' cryptography the current
generation of dongles will use keys to protect their software. Something like :-
1) PC generates a random number and transmits it to dongle along with a
validation code (software serial number).
2) Dongle masks random code with decryption key for software then encrypts
the result and sends it to the pc.
3) PC decrypts and subtracts it's random code from response. Resulting code
is key to decrypt software modules.
I guess all the encryption and decryption could be carried out in a PIC
without any real problem, it should be quite cost-effective too.
Keith.
==========================================================
Keith Dowsett "Variables won't; constants aren't."
E-mail: EraseMEkdowsettspam_OUT
TakeThisOuTrpms.ac.uk
Phone: 0181-740-3162
Fax: 0181-743-3987
Snail mail: MRC Clinical Sciences Centre, Cyclotron Unit.
Hammersmith Hospital. London W12 0NN.
'commodity hardware (was Re: PIC <> modem chips)'
1996\06\07@175252
by
Eric Smith
|
John Payson <supercat
spam_OUTMCS.COM> writes:
> Another difference is that most embedded modem products
> have an implied or contractual assurance that THE SAME PRODUCT will be
> available for a significant length of time. If you design a product to use
> a PCMCIA modem instead, you may get a significant cost savings, BUT you may
> end up pulling out your hair when your preferred modem is dropped and the
> new one you get isn't "quite" compatible.
John's really hit the nail on the head. Until last September I worked as a
software engineer for a manufacturer of dialup routers. They were building
most of their products using commodity PC hardware, hoping to take advantage
of the low costs.
There were several problems with that approach.
It would take months to qualify a particular motherboard or I/O board. By
the time it was in our production systems, the vendor had replaced their
product with a new, improved, and not fully compatible version, and we had
to go through qualification again. Or, in some cases we could convince the
vendor to continue selling us the old product if we were willing to pay a
premium price.
In some cases, we needed a customized version of a standard product, so we
paid premium prices for those as well as additional NRE charges.
And in one case, we designed our own board becasue we wanted a custom form
factor. But we were still using commodity "PC" chips, and they are
obsoleted almost as quickly as board level products.
The net result was that our materials costs were at least as high as they
would have been for custom non-PC hardware, but our labor and overhead costs
were much higher.
Eric
'Hardware Question 16C84'
1996\12\03@144353
by
Scott Horton
Please excuse my weak electronics abilities as I am an ME struggling my
way into programming these little critters.
I've read (and are still reading) lots of the PIC resources, ECH, FAQ
archives, etc. I have a couple of questions I'm sure someone (probably
everyone but me <g>) can help with:
1. Can someone tell me (in laymen terms?) what a Schmitt Trigger
is/does/is used for (as shown in the 16C84 notes)?
2. One of the App Notes from MC - re RS232 interfacing, showed a schematic
with a component called ZVN104 which was used as part of an interface to a
RS232 level. I plan on using a MAX chip or one of the other driver chips
but I am still curious as to exactly what that component was - for my
(continuing) education - I was unable to find it with any of my
electronics suppliers, or at least didn't know what I was looking for :).
Thanks in advance,
Scott
@spam@Scott.Horton1KILLspam
bridge.bst.bls.com
1996\12\03@150125
by
Bradley, Larry
|
>----------
>From: Scott Horton[SMTP:KILLspamScott.Horton1KILLspam
BRIDGE.BST.BLS.COM]
>Sent: Tuesday, December 03, 1996 2:16 PM
>To: Multiple recipients of list PICLIST
>Subject: Hardware Question 16C84
>
>(snip)
>1. Can someone tell me (in laymen terms?) what a Schmitt Trigger
>is/does/is used for (as shown in the 16C84 notes)?
A Schmitt Trigger is basically a gate with hysteresis (sp?). For
example, a normal gate may turn on at 2.5 volts on the input. It will
also turn off at that value. An input voltage that does not move quickly
through that 2.5 volt point may cause the output to oscillate. Not nice.
Normal digital type signals don't have that problem (they have a fast
rise time), but interface signals from the outside world may not have
this fast rise time. A Schmitt trigger uses positive feedback to cause
the output to switch rapidly once the input reaches the trigger level.
And it won't switch back unless the input voltage drops to a value
somewhat lower than the initial trigger value. For example, it the
output might go high when the input reaches 2.5 volts, and will switch
rapidly. It will stay high until the input voltage goes to 2 volts.
(These are just made-up numbers to show the idea).
So in the case of the PIC pins, those with a Schmitt trigger input can
safely be driven by signals
that have a slowly rising (or dropping) waveform, (such as a sine wave),
and the PIC will just see a fast transition from low to high, or high to
low.
>
(SNIP)
Larry
1996\12\03@152635
by
Antti Lukats
|
At 01:16 PM 12/3/96 -0600, you wrote:
>Please excuse my weak electronics abilities as I am an ME struggling my
>way into programming these little critters.
>
>I've read (and are still reading) lots of the PIC resources, ECH, FAQ
>archives, etc. I have a couple of questions I'm sure someone (probably
>everyone but me <g>) can help with:
>
>1. Can someone tell me (in laymen terms?) what a Schmitt Trigger
>is/does/is used for (as shown in the 16C84 notes)?
it means that there is a so called hysteris, ie if input voltge
rises slow and is some noise then after reaching certain level
the schmit trigger output goes to high and stays there until the
input level drops below the lower trigger point. those small noise
in input signal will not produces high to low glitches to be read in.
>2. One of the App Notes from MC - re RS232 interfacing, showed a schematic
>with a component called ZVN104 which was used as part of an interface to a
>RS232 level. I plan on using a MAX chip or one of the other driver chips
>but I am still curious as to exactly what that component was - for my
>(continuing) education - I was unable to find it with any of my
>electronics suppliers, or at least didn't know what I was looking for :).
in most applications its fair enought to use one 10k resistor to implement
RS232 interface to PIC. PC serial ports accept 0 / +5 Input level signal
and if you put a series resistor for current limiting in TxD line from PC
then the input protection diodes buildt in to PIC16c84 will clamp the
+12/-12V RS232 signal to +5/0 on PIC input pin.
as PIC16C84 does not have hardware uart, so the required serial IO pin
polarity can be adjusted in software.
antti
-- Silicon Studio Ltd.
-- http://www.sistudio.com
1996\12\04@005808
by
Jim Robertson
At 01:16 PM 12/3/96 -0600, you wrote:
>Please excuse my weak electronics abilities as I am an ME struggling my
>way into programming these little critters.
>
>2. One of the App Notes from MC - re RS232 interfacing, showed a schematic
>with a component called ZVN104 which was used as part of an interface to a
>RS232 level. I plan on using a MAX chip or one of the other driver chips
>but I am still curious as to exactly what that component was - for my
>(continuing) education - I was unable to find it with any of my
>electronics suppliers, or at least didn't know what I was looking for :).
>
>Thanks in advance,
>
>Scott
>
I believe the VN104 is a common Gen Purpose N channel MOSFET in a TO92
package. Its use in an RS232 circuit might be considered a little extravagant.
Jim
1996\12\05@003154
by
MICHEAL SMITH
|
----------
From: pic microcontroller discussion list on behalf of Scott Horton
Sent: Tuesday, December 03, 1996 11:16 AM
To: Multiple recipients of list PICLIST
Subject: Hardware Question 16C84
Please excuse my weak electronics abilities as I am an ME struggling my
way into programming these little critters.
I've read (and are still reading) lots of the PIC resources, ECH, FAQ
archives, etc. I have a couple of questions I'm sure someone (probably
everyone but me <g>) can help with:
1. Can someone tell me (in laymen terms?) what a Schmitt Trigger
is/does/is used for (as shown in the 16C84 notes)?
2. One of the App Notes from MC - re RS232 interfacing, showed a schematic
with a component called ZVN104 which was used as part of an interface to a
RS232 level. I plan on using a MAX chip or one of the other driver chips
but I am still curious as to exactly what that component was - for my
(continuing) education - I was unable to find it with any of my
electronics suppliers, or at least didn't know what I was looking for :).
Thanks in advance,
Scott
RemoveMEScott.Horton1TakeThisOuT
bridge.bst.bls.com
-
Simplest explanation I can think of for what a schmidt trigger does is that it
takes an analog waveform and makes it digital. In simple terms it looks at the
input voltage waveform and when it reaches a set threshold voltage, say 3
volts, it triggers its output high.
The output will not follow input. Simply speaking the input can continue to
rise or fall after the output has been set but it would have no effect on the
output-the output would remain high. Another use might be to debounce a
mechanical switch used at the input. Again simply speaking most digital IC
circuits have very fast response times. A mechanical switch has a point within
its movement when the contacts are so close together that any vibrations can
cause the circuit path to be closed and opened very rapidly. Digital circuits
could interpret this to be many (but very fast) open and closes of the switch
and then react as though the switch had been operated very many times. If you
are designing a circuit that you want to be predictable, as in the push of a
button causes the circuit to behave a certain way, then key bounce can
introduce some very unpredictable results in your circuit. The schmidt trigger
can be used to eliminate this because you can choose values that create
certain time constants (as in the schmidt trigger will not respond to any
changes at its input for a certain period of time after it has changed its
output state).
Another application for it would be to shape a waveform from sine wave to
square wave. This is common in clock circuits such as what a frequency counter
is. The schmidt trigger would be used at the input of the frequency counter to
shape the input wave form and make it easier for the counting circuits to act
upon the input in a predictable and reliable way. (as in digital circuits have
a very specific window of voltages that they read as a digital 1 or digital 0
and the schmidt trigger eliminates the "gray" area of voltages that could be
read as either because the voltage is at the threshold point of being either a
1 or a zero)
Hope this helps.
-Mike
'Need help with a little hardware RS232 inteface.'
1997\03\10@153248
by
Randy Walsh
Need help with a little hardware RS232 inteface.
Description: I've created a PC stepper motor interface using a 16c84 and a
2003. I'm currently doing Serial I/O straight from the 16c84 to the PC
Question: If I use 1 of then 2003 drivers to boost the TX line (from pic to
PC) to +12 volts, would this damage the PC? (I thing that the RS232 spec
is only +10 volts), what must I do to safely drop the voltage to 10 volts?
Thanks in advance (TIA)
Sincerely,
Randy Walsh
1997\03\10@161749
by
Mike
|
At 12:19 PM 10/03/97 -0800, you wrote:
>Need help with a little hardware RS232 inteface.
>
>Description: I've created a PC stepper motor interface using a 16c84 and a
>2003. I'm currently doing Serial I/O straight from the 16c84 to the PC
>
>Question: If I use 1 of then 2003 drivers to boost the TX line (from pic to
>PC) to +12 volts, would this damage the PC? (I thing that the RS232 spec
>is only +10 volts), what must I do to safely drop the voltage to 10 volts?
1. Pair of diodes,
2. Resistors
3. 2v7 zeners
And remember you will have some (minor) saturation of the output transistors
in the 2003 anyway.
Most PCs can quite comfortably handle 12v - but of course you should not rely
on continued use at the maximum.
Though shouldn't you have a -ve voltage on the TX line when off - say -3v, this
will help in noise rejection in case your line floats above 0v when not being
driven !
Rgds
Mike
Politicians, like babies nappies should be changed often - and for the same
reason.
1997\03\10@165343
by
Robert Lunn
>Question: If I use 1 of then 2003 drivers to boost the TX line (from pic to
>PC) to +12 volts, would this damage the PC? (I thing that the RS232 spec
>is only +10 volts), what must I do to safely drop the voltage to 10 volts?
The RS-232 spec is +/- 18 volts. +10 volts is fine.
___Bob
1997\03\10@170510
by
myke predko
|
Randy Walsh Wrote:
>Need help with a little hardware RS232 inteface.
>
>Description: I've created a PC stepper motor interface using a 16c84 and a
>2003. I'm currently doing Serial I/O straight from the 16c84 to the PC
>
>Question: If I use 1 of then 2003 drivers to boost the TX line (from pic to
>PC) to +12 volts, would this damage the PC? (I thing that the RS232 spec
>is only +10 volts), what must I do to safely drop the voltage to 10 volts?
No. RS-232 is up to 15 Volts.
Where you may have your problems is with the negative voltage generation.
Your PC (like mine) may "read" 0 Volts as a "Mark" and actually require a
negative voltage.
There's a simple circuit for using the RX Negative Voltage. Please correct
me if I'm wrong:
|
| 10K Resistor
PIC RXIn |-----^^^^^^-------------------+-------------------- From PC
| |
| >
| < "Pull Down" Resistor
| >
| |
| +-------------------- To PC
| |
| Resistor |^
TXOut|-----------^^^^^------------|
| |\
| |
| To +5 - +12 Volts
|
This will send a Negative Voltage nominally and then send a Positive voltage
when the TXOut Line is High.
Have I got the circuit correct? I typically use a DS275 which does all this
for me.
myke
"Some people say that foreign cars handle best, while others say domestic.
For my money, nothing handles as well as a rental car." - P.J. O'Rourke
1997\03\10@182331
by
Randy Walsh
|
>
> Randy Walsh Wrote:
>
> >Need help with a little hardware RS232 inteface.
> >
> Myke Predko responded:
> Where you may have your problems is with the negative voltage generation.
> Your PC (like mine) may "read" 0 Volts as a "Mark" and actually require a
> negative voltage.
>
> There's a simple circuit for using the RX Negative Voltage. Please
correct
{Quote hidden}> me if I'm wrong:
>
>
>
> |
> | 10K Resistor
> PIC RXIn |-----^^^^^^-------------------+-------------------- From PC
> | |
> | >
> | < "Pull Down" Resistor
> | >
> | |
> | +-------------------- To PC
> | |
> | Resistor |^
> TXOut|-----------^^^^^------------|
> | |\
> | |
> | +12 Volts
> |
>
> This will send a Negative Voltage nominally and then send a Positive
voltage
> when the TXOut Line is High.
>
I like this idea of stealing -12V off the RX line.
Forgive my ignorance first, I'm more of a software buff than hardware, but
what if...the RX line is receiving while I'm trying to TX? Will it's +/-
swing mess up my ability to get -12 volts from it?
Assuming this is true, and assuming I don't TX and RX at the same, then
when I leave the TXOut line low (not in use), the "To PC" line is sitting
at -12V (Did I get this right?).
What happens when I receive a character from the PC? It seams to me that I
will then get the same character sent back to the PC over the TX, only
through the pulldown resistor? Is this correct?
As before, please explain in detail, as I said, I'm a little dense when it
comes to making hardware do its thing.
Thanks again.
Randy
1997\03\10@193309
by
Lee Jones
|
> Need help with a little hardware RS232 inteface.
>
> Description: I've created a PC stepper motor interface using a 16c84 and a
> 2003. I'm currently doing Serial I/O straight from the 16c84 to the PC
>
> Question: If I use 1 of then 2003 drivers to boost the TX line (from pic to
> PC) to +12 volts, would this damage the PC? (I thing that the RS232 spec
> is only +10 volts), what must I do to safely drop the voltage to 10 volts?
RS232 specifies that each line must be in 1 of 2 states. One
state is a voltage between +6 and +25 at the transmitter output
pin (after losses, +3 to +25 volts at the receiver input pin).
The other state is a voltage between -6 and -25 at the transmitter
(-3 to -25 volts at the receiver).
The range from -3 to +3 is not a valid signal level. It's there
to provide hysteresis and a noise margin. Lots of people use 0
volts as the low level. But don't kid yourself that it's compliant
RS232 or that it will work with all devices.
Lee Jones
-------------------------------------------------------------------
Jones Computer Communications spamBeGoneleespamBeGone
frumble.claremont.edu
509 Black Hills Dr, Claremont, CA 91711 voice: 909-621-9008
-------------------------------------------------------------------
'hardware RS232 inteface'
1997\03\11@020735
by
jattievdl
Why dont u rather use a max232. No voltage problems or extra power
supplies required. It generates all the volatges needed to convert RS232
to TTL levels at the pic side. I've used it and it's working just fine.
On the voltage level debate. There is an extensive appnote on RS422/485
that fully describes the principles of RS232 with protocals, voltage
levels etc.
http://www.bb-elec.com/techlibr.html
Best regards
Jattie van der Linde
'hardware RS232 interface'
1997\03\17@041014
by
Lee Jones
|
This thread was active early last week (March 9th & 10th).
I felt that a definitive answer needed posting.
My earlier comments reflected my memory of RS-232-C which
I learned years ago. I wanted to verify the information
in the current revision before saying anything further.
> use a max232 [...] generates all the voltages needed to
> convert RS232 to TTL levels at the pic side.
Agreed. Works great.
> On the voltage level debate. There is an extensive appnote
> [on a web site] that fully describes the principles of RS232
RS232 was (note past tense) an EIA Recommended Standard. It
was superseded by EIA-232 years ago. But old habits die hard.
I don't wish to offend anyone, but the voltage levels of EIA-232
are _not_ open to debate on the PIC list. And your reference
material shouldn't be some random page on a web site (no matter
how good that page is).
[soap box alert]
Remember first principles! It's not all that hard to get a
copy of the relevant standard and _read_it_. Then you know
what was actually agreed to by the regulatory bodies.
[end soap box]
The EIA-232 voltage levels are covered by an American National
Standard which conforms to other international standards (see
CCITT V.24, CCITT V.28, ISO 2110, EIA/TIA TSB-24 and EIA/TIA
TSB-26). [Note, I think the CCITT changed its name to ITU.]
If you want to debate the voltage levels, you should
contact either the Electronics Industry Association (EIA)
or the Telecommunications Industry Association (TIA) in
the United States or your local representative group on
the appropriate international standards bodies.
As to the question under discussion, see 2.1.3 below...
ANSI/EIA/TIA-232-E-1991 was approved on July 10, 1991.
It's titled "Interface Between Data Terminal Equipment
and Data Circuit-Terminating Equipment Employing Serial
Binary Data Interchange".
A search of ANSI's on-line catalog (http://www.ansi.org)
shows that this as the latest revision available.
It's published by the Electronic Industries Association,
Engineering Department, 2001 Pennsylvania Avenue N.W.,
Washington, D.C. 20006.
EIA/TIA-232 is a voltage based interface where each device
"has a single common return (Signal Common), which can be
interconnected at the interface point." (section 1.4)
2. Signal Characteristics
2.1 Electrical Characteristics
The actual standard goes into some detail and specifies an
Interchange Equivalent Circuit (section 2.1.1, figure 2.1).
2.1.2 [outputs] "shall be designed to withstand an open
circuit, a short circuit [...], or any passive non-inductive
load [between any two pins] without sustaining damage".
[inputs] "shall be designed to withstand (not be damaged by)
any input signal within the 25 volt limit specified in
section 2.1.6."
2.1.3 "For data interchange circuits, the signal shall be
considered in the marking condition when the voltage (V1)
on the interface circuit, measured at the interface point,
is more negative than -3 volts with respect to Circuit AB
(Signal Common) [ground]. The signal shall be considered
in the spacing condition when the voltage (V1) is more
positive than +3 volts with respect to Circuit AB [ground].
The region between +/- 3 volts is defined as the transition
region. The signal state is undefined when the voltage (V1)
is in this transition region."
(page 3) Interchange Voltage
Notation Negative Positive
---------------- -------- --------
Binary State 1 0
Signal Condition Marking Spacing
Function Off On
Note that the binary state to interchange voltage reflects
one inversion (a characteristic of all the EIA-232 interface
chips that I've ever used).
2.1.4 "receiver side of an interface circuit is defined for
an applied voltage range of 3 volts to 15 volts in magnitude.
It shall have a dc resistance of not less than 3000 ohms, nor
more than 7000 ohms, measured with an applied voltage of 3 to
15 volts in magnitude. The effective shunt capacitance of the
receiver [...], including the capacitance of cable, [...]
shall not exceed 2500 picofarads. The reactive component of
the load impedance shall not be inductive. The open circuit
receiver voltage shall not exceed 2 volts in magnitude."
2.1.6 "open-circuit generator [output] voltage with respect to
Circuit AB (Signal Common) [ground] on any interface circuit
shall not exceed 25 volts in magnitude. The source impedance
of the generator side [...] including any cable [...] is not
specified; however, the impedance shall be such that a short
circuit between any two conductors (including ground) [...]
shall not result in a current in excess of 100 mA. Additionally,
the generator design shall be such that, with a test load of 3000
to 7000 ohms, the potential (V1) at the interface point shall be
not less than 5 volts nor more than 15 volts in magnitude."
If you are designing a device that is EIA-232 compliant,
your interface has to follow the voltage levels stated
above. National and international standards are the
independent references to acceptable practice.
EIA-232 defines _only_ the low level mechanical and electrical
interface. It does not address word lengths, data transfer
timing issues, or character encodings. Those higher level
protocols are covered by other standards. :-)
One other thing to keep in mind. EIA/TIA-232 is "applicable
for use at data signaling rates up to a nominal limit of
20,000 bits per second" (section 1.3 Data Signaling Rates).
So technically, EIA-232 doesn't apply at common baud rates
above 19,200. In those cases, the forward recommends:
* EIA/TIA-530 "High Speed 25-Position Interface for Data
Terminal Equipment and Data Circuit-Terminating Equipment",
* EIA/TIA-561 "Simple 8-Position Non-Synchronous Interface
Between Data Terminal Equipment and Data Circuit-Terminating
Equipment Employing Serial Binary Data Interchange", and
* EIA/TIA-574 "9-Position Non-Synchronous Interface Between
Data Terminal Equipment and Data Circuit-Terminating
Equipment Employing Serial Binary Data Interchange".
There's lots more useful information in the EIA-232 standard.
If you're working with "RS232" signals, I heartily recommend
that you get a copy of EIA-232 and study it.
Lee Jones
-------------------------------------------------------------------
Jones Computer Communications TakeThisOuTleeEraseME
spam_OUTfrumble.claremont.edu
509 Black Hills Dr, Claremont, CA 91711 voice: 909-621-9008
-------------------------------------------------------------------
'I2C hardware support'
1997\03\29@073938
by
Andrew Kovalev
Hello, PIC masters!
I'm currently coding PIC14000. I didn't manage to utilise its hardware
support feature of I2C module, although I tried to follow the diagram in
datasheet. I'm not sure if it is possible to send data by simple writing to
I2CBUF. Please address me to some example code.
With a limited time to experiment I was to get software procs for
implementing I2C master mode. It works OK but still I would like to
understand to which extent hardware support is implemented.
more to UV erase question:
I spoil chip a month erasing PIC14000. It looks like this - first time it
erases in 30 sec. Then it takes longer and longer (up to 5 mins). Finally,
it reads "nops" and never can be erased. Any suggestions why?
Thank you for reading this.
sincerely yours, Andrew.
'I2C hardware implementation'
1997\04\02@215949
by
Andrew Kovalev
Hello, PIC masters!
I'm currently coding PIC14000. I didn't manage to utilise its hardware
support feature of I2C module, although I tried to follow the diagram in
datasheet. I'm not sure if it is possible to send data by simple writing to
I2CBUF. Please address me to some example code.
With a limited time to experiment I was to get software procs for
implementing I2C master mode. It works OK but still I would like to
understand to which extent hardware support is implemented.
more to UV erase question:
I spoil chip a month erasing PIC14000. It looks like this - first time it
erases in 30 sec. Then it takes longer and longer (up to 5 mins). Finally,
it reads "nops" and never can be erased. Any suggestions why?
Thank you for reading this.
sincerely yours, Andrew.
PS. Why I received the following? I seemed to be subscribed.
----------
> From: Administrator
> Subject: Message not deliverable
'I2C master mode hardware support'
1997\04\07@021242
by
Andrew Kovalev
Hello!
Have anybody dealt with this I2C master?
Andrew.
'Fwd: It's The Hardware! (not explicitly Pic relate'
1997\05\01@144259
by
Bryan Hord
|
I thought that all of you hardware engineers would like to see this for
whatever reason.
--------------------------------------------------------------------------
The new commandments? Nonetheless, send this to EVERY hardware guy you
know...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BE ENGINEERING INSIGHTS: Making Life Easier
By Robert Herold
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Usually during the course of a day, I encounter something
that is bothersome or just not quite right. The radio in my
car is too close to the cupholder, so whenever I put down my
coffee, the station gets switched from Howard Stern to Rush
Limbaugh. Loading a new bottle into the office water cooler
inevitably spills a few drops on the carpet. The sandwich
guy asks my views of mustard versus mayonnaise despite
having heard the full details just seconds earlier.
Porting operating systems to different hardware
architectures is no different. Every system from the
Rockwell AIM-65 through the Power Computing PowerTower Pro
dual 225 MHz 604e has quirks that must be dealt with.
Perhaps someday we'll design a system that's perfect, fast,
reliable, and easy to write software for. If whoever builds
it needs some unsolicited advice, I have a list...
LOGIC DESIGN
* Put in a software-readable version number. For chips, put
in a read-only register. For circuit boards, dedicate a few
I/O bits somewhere and put in some pull-up/pull-down
resistors to make a unique identification possible. For I/O
devices, put it wherever it's convenient. Whenever a change
is made, even one that doesn't affect the operation of the
software, change the version. Someday you'll be glad you
did, be it for manufacturing test, field service, consumer
recall, hardware debug, user interface, or geek fascination
with frivolous detail.
* Avoid write-only bits in registers -- let software read
back what was written earlier. Avoid bits that mean
different things when read and written -- chew up a little
decode space instead and put them in separate registers.
* Design registers that can have individual bits modified in
a single operation. This really helps when there's more than
one bus master mucking about the system, in that register
updates don't need to be protected with a software semaphore
lock. My favorite example is the 6522 VIA registers -- the
most significant bit controls whether you're setting or
clearing, and the rest of the bits have a one wherever a bit
is to be modified and a zero wherever a bit is to remain
unchanged.
* Document what you design, preferably in a way that someone
besides you can understand. Describe not only what it is,
but also what it's for. Anyone who's taken a tour through a
data book for a modern VGA graphics controller can
appreciate this. Better yet, include some real (that is,
actually compiled, run, and debugged) source code that uses
your design. Keep the documentation available even after you
stop selling the part. Make the documentation easy to get --
and free.
* Avoid timing dependencies. Any synchronous protocol or
continuous input data stream is an exception of course, but
even there you can help by providing a bit of buffering in
your hardware. Putting a 5-million transistor 225 MHz
screamer into an interrupts-disabled spin loop waiting for a
few microseconds to pass before writing to the floppy
controller again due to some empirically observed resistance
to being written faster is not the best use of available
MIPS.
SYSTEM DESIGN
* Make physical RAM contiguous. It's just easier that way.
* For multiprocessor systems, it's nice to be able to direct
I/O interrupts to different processors to distribute the
load. Also, it's nice to be able to turn off all I/O
interrupts to all processors in a single operation and to
turn them back on later, while still allowing interprocessor
interrupts.
* For CPUs, it would be nice to separate I/O interrupts from
interprocessor interrupts; having a different pin, a
different interrupt vector, and a different interrupt enable
is ideal.
* Resources that are duplicated across different parts of
the system should have support for synchronizing their
state. For instance, the PowerPC has a time base register
and a pin for enabling it. Without that pin (or without any
means of actually controlling that pin), it's impossible to
ensure the time base register has the same value on all
processors.
* For debugging, provide a means of doing a nonmaskable
interrupt to all processors, preferably from an optional
switch, and also from a software-accessible register. If
this is a recoverable interrupt in the CPU, all the better.
This will make OS designers everywhere think of you fondly
every time the system locks up and they can push a button
and get to a kernel debugger.
* Noncoherent caches aren't a good idea. A simple OS may be
able to deal with caches that aren't coherent with DMA
accesses, but anything beyond DOS or the maces will have
major conniptions.
* Plan for bugs. Leave a couple of I/O pins around to let
you control a PAL later, so you can do a quick turn on your
design to fix the bug in the new improved gizmo that
replaces the no-longer-manufactured old gizmo.
* Let the OS designer have one bit of visible I/O somewhere.
A place for a two-pin header where an LED can be hooked up
will do. Alternatively, provide a place to hook up a logic
analyzer.
* Expansion buses should be self configuring (for example,
NuBus) or software configurable (for example, PCI). For an
example of how not to do this, see ISA, SCSI, or IDE.
PHYSICAL DESIGN
* Make the case easy to open. See the Mac IIci for an
example.
* Put upgradable stuff where you can get at it. For an
example of how not to do this, try adding RAM to a Power
Macintosh 8500.
* Use the circuit board silk-screen for user documentation.
If you've made the mistake of requiring jumpers, describe
the jumper options right on the board.
* If you must use jumpers, put an extra one or two on unused
pins. Not everyone lives ten minutes from Fry's Electronics.
* Use the circuit board silk-screen to make it easier to
debug or probe. Label the chips with real names instead of
"U24." Then tag every tenth pin with its pin number. This
helps anyone poking around with a scope probe, and besides,
its cool to personalize what that black plastic behemoth is
doing millions of times a second. While you're at it, label
some test points for clocks and interesting logic lines.
* If you must use screws, use the same kind everywhere. If
they must be different lengths, at least make them the same
thread. Make sure your design holds together if any one
given screw is missing, because that screw always falls off
the desk and takes a four-hour vacation somewhere.
* Make it quiet. Otherwise, you can't use it while your
spouse is sleeping.
* Avoid sharp edges. I hate bleeding on my motherboard.
* Connectors should be keyed. If not, they WILL be plugged
in backwards. Lay out pins in connectors so that when
they're plugged in backwards, smoke doesn't appear.
* Why is it that whenever I plug in the little twisted wire
power LED, it's always the wrong polarity? Label the pins,
preferably with the wire color that they're supposed to
take. Alternatively, given the vagaries of wire color
selection by LED vendors, label the pins minus and plus, and
I'll just assume that the black wire goes to minus.
* If it's different, use a different connector. I'm sure
many parallel printers have been plugged into the SCSI ports
on the back of Macintoshes everywhere. And in ancient times,
9-pin monitor cables were plugged into serial ports.
* If it's different, make it obvious that it's different.
Can you tell the difference between a 3.5-volt DIMM and a 5-
volt DIMM? Why aren't they labeled? For that matter, why
aren't SIMMs and DIMMs labeled in the first place? Not
everyone knows how to read DRAM part numbers.
PEOPLE IN GLASS HOUSES SHOULDN'T THROW STONES
Hardware designers who read this article may react
defensively and start writing their own list about operating
system design. They're right to do so -- we're by no means
perfect. If you need to get something off your chest, send
it to RemoveMEherold
TakeThisOuTbe.com.
----------------- End Forwarded Message -----------------
-----------------------------------------------------------------------------
bryanEraseME
.....wllink.com
Wireless Link Corporation
-----------------------------------------------------------------------------
'Help Finding Hardware'
1997\07\21@203415
by
Rick Trostel
I know this is a little off topic but, I have tried the news groups with no
luck.
Does anyone know where I can find a Point of Sale terminal with:
1. Card reader
2. LCD or Flourecsent display.
3. Keyboard with about 10 programable keys.
4. RS232 comm port.
I would like to find something like the credit card terminals that are used
with the telephone to check credit cards during sales. Except that I would
like to use it to read and write to the swipe cards and communicate with
a PC useing the serial port.
Thanks ------ Rich -------- EraseMERtrostel
aol.com
1997\07\22@130903
by
ame
|
Hi,
if you are looking for card reading/writing equipment then call
American Magnetics Corporation. I used their 711 card writer and 331
readers for an access control system I built for my previous employer.
Their contact details are:
740 Watsoncenter Road
Carson, CA 90745
Tel: 1 310 518 2380
Fax: 1 310 834 0685
email: RemoveMEamagmailEraseME
EraseMEamagaccess.com
Andy (#2 I think)
---
Date: Mon, 21 Jul 1997 20:33:31 -0400
From: Rick Trostel <RemoveMERTrostelspam_OUT
KILLspamAOL.COM>
Subject: Help Finding Hardware
I know this is a little off topic but, I have tried the news groups
with no
luck.
Does anyone know where I can find a Point of Sale terminal with:
1. Card reader
2. LCD or Flourecsent display.
3. Keyboard with about 10 programable keys.
4. RS232 comm port.
I would like to find something like the credit card terminals that are
used
with the telephone to check credit cards during sales. Except that I
would
like to use it to read and write to the swipe cards and communicate
with
a PC useing the serial port.
Thanks ------ Rich -------- RemoveMERtrostelTakeThisOuT
spamaol.com
1997\07\22@170610
by
Eric Rossi
> I would like to find something like the credit card terminals that are
used
> with the telephone to check credit cards during sales. Except that I
would
> like to use it to read and write to the swipe cards and communicate with
> a PC useing the serial port.
>
EMAC has a new device called a RAD (Remote Access Device) this device can
communicate with a host over RS232/485, has provision for a keypad, and
accomadates a text or graphics LCD. The board also has an optional second
serial RS232 port that could communicate with a card scanner. Also they
have a number of single board computers with the same functionality.
http://www.emacinc.com
Eric
1997\07\23@002256
by
blunn
Bob Lunn
07/23/97 02:25 PM
> I would like to find something like the credit
> card terminals that are used with the telephone
> to check credit cards during sales. Except that
> I would like to use it to read and write to the
> swipe cards and communicate with a PC useing the
> serial port.
Well, they're a competitor, but...
In the States (and I assume from the 'aol.com'
that you're in the States) Hypercom are a well
known supplier of POS terminals.
Try 'http://www.hypercom.com'.
Of course, my very own Keycorp also sells
these devices :).
Try 'http://www.keycorp.com.au'.
___Bob
'Req:Hardware design Sugesstions'
1997\07\28@205337
by
Glen Fry
Hi,
I'm about to start designing a small system that is to provide reasonably
accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs and 10
outputs.
I'm probably going to use a `74 for the job.
I'm looking to those of you that have experience with these these things for
advice.
1. I need to store temp setting and some other data in NV memory. I require
about 128 Bytes. May be written to once or twice a day. Can I use the EEProm
in the 74 for this?
2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
3. Is it efficient to drive the LCD from the serial port or is 4 bits on a
parallel port the best way?
4. I'm planning to use a dead simple control algorithm for the temp controller,
but just in case, does anyone have souce code (prefer basic) for a pid loop
algorithm.
Thanks & Regards,
Glen Fry
EraseMEfryspam
spamBeGonepowerup.com.au
Who is very very new to PICS, but keen to have a go.
'Req:Hardware design Suggestions'
1997\07\29@060200
by
Frank A. Vorstenbosch
|
On Tue 29 Jul, Glen Fry <RemoveMEfryKILLspam
MAIL.POWERUP.COM.AU> wrote:
>
> Hi,
>
> I'm about to start designing a small system that is to provide reasonably
> accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs and 10
> outputs.
>
> I'm probably going to use a `74 for the job.
> I'm looking to those of you that have experience with these these things for
> advice.
>
> 1. I need to store temp setting and some other data in NV memory. I require
> about 128 Bytes. May be written to once or twice a day. Can I use the EEProm
> in the 74 for this?
There is no EEPROM in the'74, so you'd have to use an external device
(I2C preferred since it may share the bus with the ADC)
> 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
Hmmm, I've been looking for I2C ADCs and have been unlucky so far. Instead
I found the MAX186, which is 12 bits, with 8 channel MUX and internal 4.096V
reference. Unfortunately, it requires 4 pins to drive it.
> 3. Is it efficient to drive the LCD from the serial port or is 4 bits on a
> parallel port the best way?
Assuming that you know the speed of the PIC and the LCD, you don't even need
a busy-feedback fromn the LCD. In that case, all you need is 6 I/O pins
(four for data, one register select and one enable pulse), and some software
delay loops to make sure you wait for the LCD to finish executing commands.
You can find timings in the LCD controller datasheet, or simply test them
yourself in the lab, and then (for the production run) *multiply all time
constants by two* just to make sure that it continues to work over temperature
variations.
Frank
------------------------------------------------------------------------
Frank A. Vorstenbosch Phone: +44-181-636 3391
Electronics & Software Engineer or: +44-181-636 3000
Eidos Technologies Ltd., Wimbledon, London Mobile: +44-976-430 569
1997\07\29@061852
by
antonio
|
A2D:
Try using a simple RC network feeding the noninverting port of a
comparator and the analogue signal feeding the inverting port.
-Ensure RC is discharged.
-Apply 5v (1 on the selected port pin)
-Start internal counter.
-Stop counter (software polling or interrupt) when the comparator's
output is high (detected by another port pin).
-Shift the byte into EEPROM memory (use something like Microchip's
24c65 - they even provide the I2C routines on the web pages).
I have built a 6 channel data logger using this system - and still
have one port pin to spare!
Antonio.þþ
NB. The RC response becomes nonlinear after about 1.5V - limit your
input voltage to 0-1.5v.
>
>On Tue 29 Jul, Glen Fry <frySTOPspam
spam_OUTMAIL.POWERUP.COM.AU> wrote:
>>
>> Hi,
>>
>> I'm about to start designing a small system that is to provide
reasonably
>> accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs
and 10
>> outputs.
>>
>> I'm probably going to use a `74 for the job.
>> I'm looking to those of you that have experience with these these
things for
>> advice.
>>
>> 1. I need to store temp setting and some other data in NV memory. I
require
>> about 128 Bytes. May be written to once or twice a day. Can I use
the EEProm
>> in the 74 for this?
>
>There is no EEPROM in the'74, so you'd have to use an external device
>(I2C preferred since it may share the bus with the ADC)
>
>> 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every
one?)
>
>Hmmm, I've been looking for I2C ADCs and have been unlucky so far.
Instead
>I found the MAX186, which is 12 bits, with 8 channel MUX and internal
4.096V
>reference. Unfortunately, it requires 4 pins to drive it.
>
>> 3. Is it efficient to drive the LCD from the serial port or is 4
bits on a
>> parallel port the best way?
>
>Assuming that you know the speed of the PIC and the LCD, you don't
even need
>a busy-feedback fromn the LCD. In that case, all you need is 6 I/O
pins
>(four for data, one register select and one enable pulse), and some
software
>delay loops to make sure you wait for the LCD to finish executing
commands.
>You can find timings in the LCD controller datasheet, or simply test
them
>yourself in the lab, and then (for the production run) *multiply all
time
>constants by two* just to make sure that it continues to work over
temperature
>variations.
>
>Frank
>
>----------------------------------------------------------------------
--
>Frank A. Vorstenbosch Phone: +44-181-636
3391
>Electronics & Software Engineer or: +44-181-636
3000
>Eidos Technologies Ltd., Wimbledon, London Mobile: +44-976-430
569
>
---------------- Hasta aquí el texto original ----------------
1997\07\29@091900
by
tjaart
|
Frank A. Vorstenbosch wrote:
{Quote hidden}>
> On Tue 29 Jul, Glen Fry <
spamBeGonefrySTOPspam
EraseMEMAIL.POWERUP.COM.AU> wrote:
> >
> > Hi,
> >
> > I'm about to start designing a small system that is to provide reasonably
> > accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs and 10
> > outputs.
> >
> > I'm probably going to use a `74 for the job.
> > I'm looking to those of you that have experience with these these things for
> > advice.
> >
> > 1. I need to store temp setting and some other data in NV memory. I require
> > about 128 Bytes. May be written to once or twice a day. Can I use the EEProm
> > in the 74 for this?
>
> There is no EEPROM in the'74, so you'd have to use an external device
> (I2C preferred since it may share the bus with the ADC)
>
> > 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
>
> Hmmm, I've been looking for I2C ADCs and have been unlucky so far. Instead
> I found the MAX186, which is 12 bits, with 8 channel MUX and internal 4.096V
> reference. Unfortunately, it requires 4 pins to drive it.
The PCF8591 is a 4*8bit A/D + 1*D/A. (I2C) The price seems ok.
--
Friendly Regards
Tjaart van der Walt
KILLspamtjaartspamBeGone
wasp.co.za
________________________________________________________
| WASP International http://wasp.co.za |
| R&D Engineer : GSM peripheral services development |
|Vehicle tracking | Telemetry systems | GSM data transfer|
|Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 |
| WGS-84 : 26010.52'S 28006.19'E |
|________________________________________________________|
1997\07\29@112619
by
Matt Bonner
> > 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
>
> Hmmm, I've been looking for I2C ADCs and have been unlucky so far. Instead
> I found the MAX186, which is 12 bits, with 8 channel MUX and internal 4.096V
> reference. Unfortunately, it requires 4 pins to drive it.
>
Check out the Crystal Semiconductor CS5505 16 bit A/D. While not IIC,
when you use it in its SEC (synchronous external clocking) mode, it can
share an IIC bus with a serial EEPROM. Of course you have to use an
extra IO pin on the controller as a chip enable to tri-state the A/D
data line - and you have to bit bang the A/D communications instead of
using a true IIC routine.
Another option is to check out Linear Technology (http://www.linear-tech.com ?)
- they're always coming out with neat analog stuff.
-- Matt
'PWM hardware chip'
1997\07\29@124512
by
Josef Hanzal
|
First thank you all for your help on finding 12 bit A/D chip with serial
interface. When browsing at the Linear site, I have found a PWM chip, which
someone looked for some time ago. Althought it does not have an SPI, I2C nor
other standard interface, and is originaly designed for manual control, it
should not be a big problem to simulate a press of a pushbutton with the
PIC. I did not download the datasheet, but in the case there is some
debounce circuit, the simulation should be reasonably slow.
BTW, one 12C508 could make (multiple) PWM hardware chip with any, even
selectable resolution and any interface you wish, all in 8 pin package. But
the LTC1426 is ready to use.
Text from the http://www.linear.com:
LTC1426
The LTC1426 is a dual micropower 6-bit PWM DAC featuring versatile PWM
outputs and a flexible pushbutton compatible digital interface. The DAC
outputs provide a PWM signal that swings from 0V to VREF, allowing the
full-scale output to be varied by adjusting the voltage at VREF.
Josef
'Req:Hardware design Suggestions'
1997\07\29@125301
by
Bruce Cannon
|
You don't need a comparator to do what Antonio suggests, but we sure aren't
talking ten bits. But for that zero component count, el cheapo resistive
a/d, like to read a user input knob with a '54 or something:
The BASIC Stamp's POT routine uses the schmitt trigger inputs as the
'comparator.' Hook unknown resistor to i/o pin, other end through 0.1uf to
ground. Charges cap for some max time, then goes into a loop in which the
pin is pulsed output low, then set to input and checked for low, if not
increment counter and do again. Some people improve accuracy with an extra
i/o line with a precision resistor to calibrate/compensate for mfr and temp
variations in the cap.
----------
Bruce Cannon
Style Management Systems
Remember: electronics is changing your world...for good!
----------
From: Antonio Vilches <EraseMEantonio
EraseMEVILCHES.IDISCOVER.CO.UK>
To: @spam@PICLIST@spam@
spam_OUTMITVMA.MIT.EDU
Subject: Re: Req:Hardware design Suggestions
Date: Tuesday, July 29, 1997 3:18 AM
A2D:
Try using a simple RC network feeding the noninverting port of a
comparator and the analogue signal feeding the inverting port.
-Ensure RC is discharged.
-Apply 5v (1 on the selected port pin)
-Start internal counter.
-Stop counter (software polling or interrupt) when the comparator's
output is high (detected by another port pin).
-Shift the byte into EEPROM memory (use something like Microchip's
24c65 - they even provide the I2C routines on the web pages).
I have built a 6 channel data logger using this system - and still
have one port pin to spare!
Antonio.~~
NB. The RC response becomes nonlinear after about 1.5V - limit your
input voltage to 0-1.5v.
>
>On Tue 29 Jul, Glen Fry <spamBeGonefry
KILLspamMAIL.POWERUP.COM.AU> wrote:
>>
>> Hi,
>>
>> I'm about to start designing a small system that is to provide
reasonably
>> accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs
and 10
>> outputs.
>>
>> I'm probably going to use a `74 for the job.
>> I'm looking to those of you that have experience with these these
things for
>> advice.
>>
>> 1. I need to store temp setting and some other data in NV memory. I
require
>> about 128 Bytes. May be written to once or twice a day. Can I use
the EEProm
>> in the 74 for this?
>
>There is no EEPROM in the'74, so you'd have to use an external device
>(I2C preferred since it may share the bus with the ADC)
>
>> 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every
one?)
>
>Hmmm, I've been looking for I2C ADCs and have been unlucky so far.
Instead
>I found the MAX186, which is 12 bits, with 8 channel MUX and internal
4.096V
>reference. Unfortunately, it requires 4 pins to drive it.
>
>> 3. Is it efficient to drive the LCD from the serial port or is 4
bits on a
>> parallel port the best way?
>
>Assuming that you know the speed of the PIC and the LCD, you don't
even need
>a busy-feedback fromn the LCD. In that case, all you need is 6 I/O
pins
>(four for data, one register select and one enable pulse), and some
software
>delay loops to make sure you wait for the LCD to finish executing
commands.
>You can find timings in the LCD controller datasheet, or simply test
them
>yourself in the lab, and then (for the production run) *multiply all
time
>constants by two* just to make sure that it continues to work over
temperature
>variations.
>
>Frank
>
>----------------------------------------------------------------------
--
>Frank A. Vorstenbosch Phone: +44-181-636
3391
>Electronics & Software Engineer or: +44-181-636
3000
>Eidos Technologies Ltd., Wimbledon, London Mobile: +44-976-430
569
>
---------------- Hasta aqum el texto original ----------------
----------
'Req:Hardware design Sugesstions'
1997\07\29@134746
by
mike
|
In message <.....1.5.4.32.19970729193956.0071e520spam_OUT
mail.powerup.com.au>
>
TakeThisOuTPICLIST.....
TakeThisOuTMITVMA.MIT.EDU writes:
> Hi,
>
> I'm about to start designing a small system that is to provide reasonably
> accurate temp control, drive a 2x16 or 2x20 lcd and handle12 inputs and 10
> outputs.
>
> I'm probably going to use a `74 for the job.
> I'm looking to those of you that have experience with these these things for
> advice.
>
> 1. I need to store temp setting and some other data in NV memory. I require
> about 128 Bytes. May be written to once or twice a day. Can I use the EEProm
> in the 74 for this?
No. I think that your best bet would be to use some serial EEProm
or FRAM.
>
> 2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
You could check out Maxims new 10 and 12 bits ADCs. The range is
max124x. There is a single channel version in an SO-8 package, and they
do 4 and 8 channel versions too.
One nice thing about them (although I have never used them) is that
the 10 bit and 12 bit versions are pin and software compatible making
upgrades easy (ish).
>
> 3. Is it efficient to drive the LCD from the serial port or is 4 bits on a
> parallel port the best way?
I would use 4 bits on the parallel port. There is code around the 'net
which you could use.
>
> 4. I'm planning to use a dead simple control algorithm for the temp
controller,
> but just in case, does anyone have souce code (prefer basic) for a pid loop
> algorithm.
>
> Thanks & Regards,
> Glen Fry
> TakeThisOuTfryKILLspam
spampowerup.com.au
> Who is very very new to PICS, but keen to have a go.
>
Regards,
Mike Watson
1997\07\29@202923
by
Thomas Vegeby
>2. I need a cheap but reliable 10 bit A/D with IIC. (dosen't every one?)
There are few ADCs with I2C interace, but National makes a 12-bit. Look for
LM12438:
12-Bit Plus Sign Data Acquisition System with Serial I/O and Self-Calibration
at http://www.national.com/catalog/Analog_A.html .
It's very capable but not cheap, USD 35 1-25.
'Hardware needed'
1997\07\31@091609
by
Tom Mariner
Hello Fellow Pic'ers
Just trolling on the possibility of buying rather than building.
We need a PIC-driven PCB that has voice out, some buffered inputs and some
buffered outputs. Anyone have such an animal that they are willing to talk
about for small quantities (10). We don't want to charge the client bucks for
such a small production run and would rather concentrate on the software.
Tom
1997\07\31@092545
by
WF AUTOMA‚ÌO
Tom Mariner wrote:
>
> Hello Fellow Pic'ers
>
> Just trolling on the possibility of buying rather than building.
>
> We need a PIC-driven PCB that has voice out, some buffered inputs and some
> buffered outputs. Anyone have such an animal that they are willing to talk
> about for small quantities (10). We don't want to charge the client bucks for
> such a small production run and would rather concentrate on the software.
>
> Tom
look at http://www.isd.com
Miguel.
'Hardware support for I2c master mode? Does this ex'
1998\04\14@151225
by
Catch-It
Hiya,
I am using the 16C77 and trying to use the SSP in master mode. Does the
PIC actually do anything for me? I set the mode in SSPCON and setup the
TRISC ports as inputs, stuffed a value into SSPBUF and nothing happened (got
LEDs on the output.
Is there anything else I should be doing (i.e. how do you set the 100khz or
400kHz rate) or is the firmware master mode as much use as a manager in a
crisis (i.e. I have to do all the work myself and bit-bang it?)
If I have to do this, how tolerent is the I2c bus of other things happening?
I will be having a number of other interrupts going off at the same time, so
this could delay any software implementation.
Cheers
Catchy..
1998\04\14@163001
by
John W. Temples
On Tue, 14 Apr 1998, Catch-It wrote:
> I am using the 16C77 and trying to use the SSP in master mode. Does the
> PIC actually do anything for me?
I got the impression that it doesn't -- I ended up using Microchip's
swi2c14 software implementation of I2C.
--
John W. Temples, III || Providing the first public access Internet
Gulfnet Kuwait || site in the Arabian Gulf region
1998\04\15@152449
by
David Wong
In the master mode the pic doesn't actually do anything for you. Master
mode is implemented in software. I2C is very tolerant of other
interrupts. I tested this out by setting up a pic as an I2C master and
then also set up the pic's external interrupt. The pic was able to
handle both with out a problem. My test set up involved a Pic writing
to a PCF 8574, which is an I2C remote I/O device. This device had Led
hooked up to in and the data from the pic just made the lights blink in
a rotating fashion. I then hooked up a function generator to the
external interrupt of the pic and varied the frequency. The pic and the
remote I/O device worked fine. I2C is very forgiving you can interrupt
an I2C master in the middle of a transmission and it will just wait
until after the interrupt is handled and then just continue to transmit.
If you need data sent over very rapidly this could be a problem, but if
not. Then it's really no big deal.
Later
DW
'MPLAB NEED A HARDWARE?'
1998\06\01@213223
by
WF AUTOMACAO
Must i have a Hardware to run MPLAB?
Miguel.
1998\06\01@214940
by
Dmitry Kiryashov
WF AUTOMACAO wrote:
>
> Must i have a Hardware to run MPLAB?
>
> Miguel.
No. I run MPLAB without any PICMaster or ICEPIC emulators
with only build in PICSim software emulator.
What kind of troubles you have ?
WBR Dmitry.
1998\06\02@033509
by
Jorge Ferreira
At 22:10 98.06.01 -0700, you wrote:
>Must i have a Hardware to run MPLAB?
>
> Miguel.
>
No.
Well, you need the PC at least ;-}
===============================================================
cumprimentos / best regards
Jorge Ferreira //.....jorgegf
RemoveMEmail.telepac.pt
------ Make sure brain is in gear before engaging mouth -------
===============================================================
1998\06\02@062802
by
hatfield
WF AUTOMACAO wrote:
>
> Must i have a Hardware to run MPLAB?
I am using it without hardware. Just writing code in their
assembler and then running it on their simulator. I will be
burning the code into hardware later...
Fred.
RemoveMEfred.hatfield
spamBeGonesstar.com
1998\06\02@150448
by
andre
No
Andre
WF AUTOMACAO wrote:
> Must i have a Hardware to run MPLAB?
>
> Miguel.
'searching for PIC 16C77 hardware emulator recommen'
1998\06\06@202419
by
Neil Gandler
Hi everyone, I am new to this list. I currently have a project where
I am using a PIC 16C77. I am sick of burning a windowed EPROM version
of my firmware everytime I need to make a firmware change. I would like
to purchase a hardware emulator for the PIC 16C77. I have seen
ITU's ICEPIC, which looks robust, yet is quite expensive for a hobbyist.
Perhaps there are less expensive PIC emulators availble.
I would like to hear recommendations and experiences (negative or
positive) relating to PIC emulators. Thanks
Neil Gandler
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
1998\06\08@004646
by
tjaart
|
Neil Gandler wrote:
> Hi everyone, I am new to this list. I currently have a project where
> I am using a PIC 16C77. I am sick of burning a windowed EPROM version
> of my firmware everytime I need to make a firmware change. I would like
> to purchase a hardware emulator for the PIC 16C77. I have seen
> ITU's ICEPIC, which looks robust, yet is quite expensive for a hobbyist.
> Perhaps there are less expensive PIC emulators availble.
> I would like to hear recommendations and experiences (negative or
> positive) relating to PIC emulators. Thanks
You get what you pay for. Get a PICMaster.
--
Friendly Regards
Tjaart van der Walt
spamBeGonetjaart@spam@
spam_OUTwasp.co.za
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS TakeThisOuT0832123443spam
wasp.co.za (160 chars max)|
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
'Redisigned hardware for PICALL - PIC programmer'
1998\08\17@064641
by
Bojan Dobaj
|
At my www page (see below) you can find completely redesigned hardware for
PICALL - PIC programmer. With this hardware all PICs listed below (up to 40
PIN) can be programmed without an adapter in 40 PIN ZIF socket.
With PICALL following devices can be programmed by now:
PIC16C54, PIC16C55, PIC16C56, PIC16C57, PIC16C58
PIC12C5xx, PIC14000, PIC16C554, PIC16C556, PIC16C558, PIC16C61, PIC16C62,
PIC16C62A, PIC16CR62, PIC16C63, PIC16C64, PIC16C64A, PIC16CR64, PIC16C65,
PIC16C65A, PIC16C66, PIC16C67, PIC16C620, PIC16C621, PIC16C622, PIC16C710,
PIC16C71, PIC16C711, PIC16C72, PIC16C73, PIC16C73A, PIC16C74, PIC16C74A,
PIC16C76, PIC16C77, PIC16F83, PIC16CR83, PIC16C84, PIC16F84, PIC16CR84,
PIC16C923, PIC16C924, PIC16C642, PIC16C662, PIC16C715
and you can simply add new devices by changing DEVICE.INI file:
(you must enter program size, data size, fuses type and algorithm type)
Bojan Dobaj
|------------------------------------------------------|
| EMAIL: |
| bojan.dobajEraseME
bigfoot.com OR RemoveMEbojan.dobajEraseME
spam_OUTuni-mb.si |
| |
| HOME PAGE: |
| P16PRO low cost middle range |
| PIC microcontrollers programmer |
| |
| http://www.geocities.com/SiliconValley/Peaks/9620/ |
|------------------------------------------------------|
'17CX42X and hardware multiplier'
1998\09\04@100406
by
Flavio Cappelli
Hello all,
I am a little confused because Microchip data sheets and web
pages are ambiguous: could anybody explain me which PIC
of 17CX42X family does have hardware multiplier ?
Thanks.
Flavio
1998\09\04@104957
by
Matt Bonner
Flavio Cappelli wrote:
>
> I am a little confused because Microchip data sheets and web
> pages are ambiguous: could anybody explain me which PIC
> of 17CX42X family does have hardware multiplier ?
>
Flavio,
AFAIK, the entire 17C series has an 8x8 hardware multiplier. I've got
definite plans for this family, especially the 75x and 76x (all that
serial IO!).
Also, I believe that MicroChip designed the 17C75x to work efficiently
with C compilers.
mIGUEL will probably be able to contribute more since he's done a number
of projects with the 17C series.
--Matt
1998\09\04@123105
by
John Bellini
See the BLUE below.
-----Original Message-----
From: Matt Bonner [@spam@mbonnerRemoveME
EraseMESUNADA.COM]
Sent: Friday, September 04, 1998 7:47 AM
To: EraseMEPICLIST
@spam@MITVMA.MIT.EDU
Subject: Re: 17CX42X and hardware multiplier
Flavio Cappelli wrote:
I am a little confused because Microchip data sheets and web
pages are ambiguous: could anybody explain me which PIC
of 17CX42X family does have hardware multiplier ?
Flavio,
AFAIK, the entire 17C series has an 8x8 hardware multiplier. I've got
definite plans for this family, especially the 75x and 76x (all that
serial IO!).
Also, I believe that MicroChip designed the 17C75x to work efficiently
with C compilers.
mIGUEL will probably be able to contribute more since he's done a number
of projects with the 17C series.
--Matt
1998\09\04@221024
by
Clyde Smith-Stubbs
> > I am a little confused because Microchip data sheets and web
> > pages are ambiguous: could anybody explain me which PIC
> > of 17CX42X family does have hardware multiplier ?
The 17C42 does not have the hardware multiplier; all other 17Cxx devices do.
The 17C42 is not recommended for new designs, the 17C42A is the recommended
replacement.
Regards, Clyde
--
Clyde Smith-Stubbs | HI-TECH Software
Email: @spam@clydespam_OUT
.....htsoft.com | Phone Fax
WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885
PGP: finger spamBeGoneclydeEraseME
htsoft.com | AUS: +61 7 3354 2411 +61 7 3354 2422
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.
1998\09\05@005617
by
Jim Robertson
|
At 15:50 4/09/98 +0200, you wrote:
>Hello all,
>
>I am a little confused because Microchip data sheets and web
>pages are ambiguous: could anybody explain me which PIC
>of 17CX42X family does have hardware multiplier ?
>
>Thanks.
>
>Flavio
All 17Cxx parts have an 8x8 multiplier except the orginal 17C42. The 17C42A
is recommended as a replacement as it has the 8x8 multiplier and improved
code protection.
I know about the ambiguity you are talking about. I emailed the microchip
webmaster months ago re the wrong data on their web site.
So far the response from microchip has been what we all have come to expect
from them. They really must pay their staff peanuts...
Jim
--------------------------------------------------------
Jim Robertson
NEWFOUND ELECTRONICS
Email: newfoundspamBeGone
pipeline.com.au
http://www.pipeline.com.au/users/newfound
"How come, when women got the right to vote, they were not instantly
saddled with the responsibility to fight in war to defend their right to
vote? "
--------------------------------------------------------
'Can I configure PWM hardware for low frequencies?'
1998\11\01@115512
by
Jon Petty
Hello everyone
I have a 16F84 program that currently uses 3 PWM outputs that were done in
software. I want to expand the code, but the timing issues for PWM make it
pretty difficult.
If I go to a PIC with PWM hardware can I configure that hardware to run at low
frequencies i.e. 15Hz or 30Hz and 100Hz?
Can a PIC with multiple PWM outputs be configured so each PWM pin has its own
frequency?
I've been having fantasies of being able to configure the PWM in hardware to
accomplish these tasks.
Can it be done?
Which PIC has the most flexibility for these tasks?
Thanks in advance
Jon
1998\11\01@141402
by
Mark Willis
|
Jon Petty wrote:
{Quote hidden}>
> Hello everyone
>
> I have a 16F84 program that currently uses 3 PWM outputs that were done in
> software. I want to expand the code, but the timing issues for PWM make it
> pretty difficult.
>
> If I go to a PIC with PWM hardware can I configure that hardware to run at low
> frequencies i.e. 15Hz or 30Hz and 100Hz?
>
> Can a PIC with multiple PWM outputs be configured so each PWM pin has its own
> frequency?
>
> I've been having fantasies of being able to configure the PWM in hardware to
> accomplish these tasks.
>
> Can it be done?
> Which PIC has the most flexibility for these tasks?
>
> Thanks in advance
>
> Jon
If you need to use a fast system clock, you may "get" to do a
"bit-banged" PWM scheme (I've had to do that, basically you use a bit
set or bit clear to toggle the port bit.) For this, any PIC will work
OK (Throw a 16F84 at it, if convenient, those're so handy to play with
<G>)
If you can slow the system's clock down to a slow speed, though, you
might be able to use on-chip PWM. So it sort of depends on your
required processor loading. And how accurate you need your PWM's period
to be.
If you're watching tons of sensors, checking everything out
constantly, and running a fast system clock, then you basically sit in a
loop & do a constant-length task (either do everything you need to do
then idle waiting for a timer interrupt, or code each longer task into
"timeslices" and do as many timeslices worth of tasks as you can) each
loop, one of the tasks being resetting and/or incrementing the PWM
counter & toggling the PWM on or off - so if you want to use 100 Hz PWM
with 1% resolution you need your timing loop (all told) to execute at 10
kHz (100 Hz * 100 "time slots", hopefully that's clear <G> (Also called
a "RTOS" or Real Time OS, though this is a quick description & not
complete it gives you the idea. It can be a trick to make sure you cut
the tasks all down to the same size, waiting for a timer interrupt &
doing the PWM in there while just looping through all the tasks with no
watchdog may be a good way to do it - don't try that on an avionics
package or pacemaker, of course, but it's fine for fun projects!)
If you don't have much CPU need, just need PWM, you might run an RC
setup (Capacitors vary with temperature a lot, so expect temperature
variations or spend $$ on capacitors with zero temperature coefficient)
- or you can use a slow crystal or even divide an oscillator down to
give you the clock speed you want (a little "power hungry" on batteries,
that, but if you're on AC power, not bad.) You could also run RC with a
potentiometer & dial the speed you need (Try THAT with a crystal!) - use
a conductive plastic type pot (or a bypass resistor) as an open circuit
here would be BAD! (I've wondered about playing with a digitally
controlled potentiometer to vary CPU speed for a couple projects, sort
of a PLL feedback loop, to increase battery life - run the clock slow as
you can while still doing everything necessary, basically.)
Mark, RemoveMEmwillis@spam@
spamBeGonenwlink.com
'Hardware Usart'
1998\11\03@183712
by
Stuart O'Reilly
Hello, A couple of questions regarding serial coms for a pic network.
(I'm using PBPRO)
1: With the Hserin and Hserout commands are these interupt driven or do
they act exactly the same as serin and serout, the reason being is i
want to do stuff while ser coms are being tx and rx.
2: With serin you save the incomming data to set variables eg.
Temp1,Temp2,Temp3 etc. Is there a way that i can send 2 qualiferes, then
the third byte i send is a value indicating how many bytes are following
eg if the third byte = 10 then serin will automatically allocate 10
bytes of ram for the incomming data. The reason behind this is i want a
pic to poll the network node by node, if they have nothing to say they
reply with a NAK, if they do have something to say then they reply with
STX, nodeaddress, number of bytes to follow, and then the actuall bytes
of data and finished with an EOT.
Thankyou
Regards Stuart
'[OT] DRAM/ HWB Hardware Book/ Pinouts etc.'
1998\11\11@161851
by
Stefan Sczekalla-Waldschmidt
|
Hi,
"Good News" - no - not another virus ...
Once there was a very good Site where you can lock up all this
frequently needed
stuff like Pin-Out4s, informaiton on cabeling etc. called Hardware Book.
Then the hompage suddenly disppeared...
The former adress of the homepage of the Hardware Handbook at:
http://www.blackdown.org/~hwb/hwb.html
is no longer valid.
After some very frustrating work I found a E-Mail of a friend of the
maintainer
Joakim Vgren. The friend gave me the new URL of the HWB.
http://hwb.acc.umu.se/index.html
If somebody is willing to support this realy famous compilation of
useful Stuff
with Pin-Outs etc. you can find a page with E-Mail Addresses for
pre-sorted posting.
slightliy of topic, but recently someone pointed to the old location.
kind regards,
Stefan Sczekalla-Waldschmidt
.....ssw@spam@
EraseMEoikossw.de
PS:
Joakim4s E-Mail .....qtechRemoveME
mailhost.net is NOT valid as i tested
I think the correct mail-address could be found at:
http://hwb.acc.umu.se/menu_Comment.html
'Need PIC Hardware Emulator recommendations (16C74)'
1998\11\11@171126
by
Ry Lato
Need PIC Hardware Emulator recommendations (16C74)
I have been working on a large personal project using the PIC16c74, for
almost two years. I am getting sick of burning and erasing these things
every time I have a code change. Debugging this way is tedious,
frustrating and time consuming. I am searching for a simple hardware
emulator, that will allow me to set breakpoints, step through my code
and eliminate the constant hassle of erasing and burning PICs! Cost is
an issue. I would like to spend less than $600. I am looking for
recommendations from people who have experience using PIC emulator tools
and can provide some constructive advice. Thanks
Neil Gandler
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
1998\11\11@193030
by
andre
|
Lato,
Microchip has PICMASTER emulators on sale for $999 the reason
for that is new MPLAB-ICE 2000 came out it is $2000.
I have 2 picmaster emulators at home I use them all the time.
some pic engineers do not use emulators at all .all I can tell you that
picmaster is very good emulator I didn't have any problem with it.
I paid them $2500 each it comes with any probe you want for 74
you need to choose 16J. I was thinking to sale one of them but since
Microchip dropped the price too much how much am I going to sale it for
I reader keep it. I like to know what kind of project is it that you are
working on it for 2 years ?
Andre Abelian
Ry Lato wrote:
{Quote hidden}> Need PIC Hardware Emulator recommendations (16C74)
>
> I have been working on a large personal project using the PIC16c74, for
> almost two years. I am getting sick of burning and erasing these things
> every time I have a code change. Debugging this way is tedious,
> frustrating and time consuming. I am searching for a simple hardware
> emulator, that will allow me to set breakpoints, step through my code
> and eliminate the constant hassle of erasing and burning PICs! Cost is
> an issue. I would like to spend less than $600. I am looking for
> recommendations from people who have experience using PIC emulator tools
> and can provide some constructive advice. Thanks
>
> Neil Gandler
>
> ______________________________________________________
> Get Your Private, Free Email at
http://www.hotmail.com
1998\11\12@081122
by
Andy Kunz
>an issue. I would like to spend less than $600. I am looking for
>recommendations from people who have experience using PIC emulator tools
>and can provide some constructive advice. Thanks
Check out the Tech-Tools stuff. I have 2 Mathias units and love them both!
http://www.tech-tools.com
They are within your price range.
Andy
==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================
'Hardware scheme'
1998\12\10@162156
by
Goovaerts
|
part 0 4781 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.1"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Does anybody know what the values are for the following
components (Look at attachement to see the schematic --> RS232-I2C interface
!)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Probably all the VCC's in the picture are +5V
?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>1. Power supply area : D1, Z1, VCC (up right in
picture)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>D1 --> probably
1N4148 (Casual diode) ?</FONT></DIV>
<DIV><FONT size=2>Z1 -->
?</FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2>VCC
--> +5V ?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000 size=2>2. I2C area : R2, R3 and VCC (up left in
picture) </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>R2 --> Think it's 4,7k
?</FONT></DIV>
<DIV><FONT size=2>R3 --> Think it's 4,7k
?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Both with VCC = +5V ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>3. Oscillator area : Y1, C7, VCC (down right in picture)
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>VCC --> 5V ?</FONT></DIV>
<DIV><FONT size=2>Y1 --> 20 MHz !!! In
picture 8 MHz crystal is used. Think thats important to choose C7-waarde
?</FONT></DIV>
<DIV><FONT size=2>C7 -->
? </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>4. VCC (down left in picture)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>VCC --> +5V ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>By the way : is this a Power On Reset scheme. I
have been told that you have to do this with a</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>RC-filter to ensure that the
reset pulse is long enough to actually reset the PIC ! ?</FONT></DIV>
<DIV><FONT size=2>Others told me to connect Vdd with MCLR with or without a
resistor in between. What do I have to</FONT></DIV>
<DIV><FONT size=2>do here, and what are the values for R,C and VCC
?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Probably a lot of my questions you ask yourself why in
godsname am I asking this. Please be </FONT></DIV>
<DIV><FONT size=2>patient with me. I'm a beginner, but I'm learning much and
fast !</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks for your time.</FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT color=#000000 size=2>Hope I didn't make anybody mad because I'm
sending a picture. But its a small one.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT> </DIV>
<DIV><FONT size=2>Hope to hear from you soon.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Glenn Goovaerts !</FONT></DIV></BODY></HTML>
</x-html>
Attachment converted: wonderland:Schematic.gif (GIFf/JVWR) (0002103C)
1998\12\11@065625
by
Caisson
|
Van: Goovaerts <.....goofy1STOPspam
@spam@GLO.BE>
Aan: PICLISTEraseME
@spam@MITVMA.MIT.EDU
Onderwerp: Hardware scheme
Datum: donderdag 10 december 1998 22:02
Hello Glenn,
> Does anybody know what the values are for the following components (Look
at > attachement to see the schematic --> RS232-I2C interface !)
> Probably all the VCC's in the picture are +5V ?
Yes. It's the output of the 78L05 voltage regulator ...
> 1. Power supply area : D1, Z1, VCC (up right in picture)
> D1 --> probably 1N4148 (Casual diode) ?
Could be something heavier. It should be good for 150 mA (max current for
a 78L05)
Maybe a 1N4001.
> Z1 --> ?
Equal to the maximum supply voltage of the 78L05. It protects agains
over-voltage and swapping the Plus/Minus wires. It should be a sturdy one.
Maybe a fuse between J2, Pin1 and the Diodes should be in order. A 12V
bulb 0.5 A would doo to. It should only light-up if something goes wrong.
Talking about making the circuit Fail-safe ... Whow !
> VCC --> +5V ?
See above.
> 2. I2C area : R2, R3 and VCC (up left in picture)
> R2 --> Think it's 4,7k ?
> R3 --> Think it's 4,7k ?
Is O.K., but 10K will work as good. For short-ish wiring
> Both with VCC = +5V ?
VCC == VCC :-) (see answer on first question)
> 3. Oscillator area : Y1, C7, VCC (down right in picture)
> VCC --> 5V ?
VCC == VCC (I'm hearing an Echo ...echo... echo ... ;-)
> Y1 --> 20 MHz !!! In picture 8 MHz crystal is used.
> Think thats important to choose C7-waarde ?
> C7 --> ?
C7 is for the de-coupling of the Pic's supply voltage only.
It has got nothing to do with the crystal.
> 4. VCC (down left in picture)
> VCC --> +5V ?
VCC == VCC (Can we make a song with this as the center-point <g>)
> By the way : is this a Power On Reset scheme.
> I have been told that you have to do this with a RC-filter to ensure
> that the reset pulse is long enough to actually reset the PIC ! ?
> Others told me to connect Vdd with MCLR with or without a resistor
> in between. What do I have to do here, and what are the values for
> R,C and VCC ?
A power-on reset circuit is build-in into the Pic. An external Power-on
reset is only needed when the voltage rise-time is slow.
On the subject of pulling-up the MCLR with a resistor : The book say's that
it's good against ESD & EOS (Electro Static Discharge & Electrostatic
Overstress). But I don't know. I myself just connect it to VCC. You
could do it with a resistor if you are thinking about ISP (In System
Programming : Programming a PIC when it's allready soldered onto the
circuit-board).
> Probably a lot of my questions you ask yourself why in godsname am I
> asking this. Please be patient with me. I'm a beginner, but I'm learning
> much and fast !
A year ago I knew nothing about PIC-controllers, Now I'm "the master of the
Universe"
Quoted from somewhere :
"Jesterdaj I koeld not write PIK. Now I am writing ... ehhh.. Stuff for it
!"
> Thanks for your time.
>
> Hope I didn't make anybody mad because I'm sending a picture. But its a
small one.
If you would not have supplied it I could not have given you the answer you
are getting now ... Just don't send big ones.
> Hope to hear from you soon.
> Glenn Goovaerts !
And I am Rudy Wieser
Greetings & welcome.
'Software controlled Hardware reset....'
1998\12\22@132550
by
D. Schouten
|
Hi All,
I'm currently doing a project with a 16C73A in which I require a
software controlled MCLR reset. I need this because I have the
following problem :
When I power-up the PIC the software is running with no problems. When
for example a certain external voltage drop is detected on an A/D
channel (the total unit is battery powered, but the PIC is safely
supplied by a 7805 regulator), the software jumps to a subroutine.
When this external voltage is back to normal again, the software will
be reset by jumping out of the subroutine back to Start (address 0)
initializing all registers again etc. etc.
The problem is that after this 'soft-reset' I experience some problems
with my A/D conversions resulting in large conversion errors. When I
reset the processor by pulling down MCLR, everything works fine again.
So my question is, is it possible to (MCLR) reset the 16C73A just by
using some instructions?
Right now, I've connected an NPN transistor to RA4 to pull down MCLR
when I exit the above mentioned subroutine. But until this doesn't
work yet.
I hope you guys can help me out on this.
Bye,
Daniel...
1998\12\22@144449
by
evan
|
> On Tues Dec 22 1998 at 10:11am Daniel Schouten wrote:
> When I power-up the PIC the software is running with no problems. When
> for example a certain external voltage drop is detected on an A/D
> channel (the total unit is battery powered, but the PIC is safely
> supplied by a 7805 regulator), the software jumps to a subroutine.
> When this external voltage is back to normal again, the software will
> be reset by jumping out of the subroutine back to Start (address 0)
> initializing all registers again etc. etc.
> The problem is that after this 'soft-reset' I experience some problems
> with my A/D conversions resulting in large conversion errors. When I
> reset the processor by pulling down MCLR, everything works fine again.
Sounds like your PIC A/D module isn't getting properly initialized in the
software, in that your software is relying on a default power-up value for a
bit or register instead of explicitly setting it. Ensure all A/D-related
registers are set in your software before attempting a conversion. The
manual has a nice register summary page showing the reset state of all
registers for POR and BOR resets vs. other resets, which may help.
> So my question is, is it possible to (MCLR) reset the 16C73A just by
> using some instructions?
> Right now, I've connected an NPN transistor to RA4 to pull down MCLR
> when I exit the above mentioned subroutine. But until this doesn't
> work yet.
I suppose a self-induced reset can be done using either MCLR or Vdd. The
advantage of switching the Vdd power to the PIC is that you can take
advantage of the Power-on Reset (POR), Power-up Timer (PWRT), and the
Brown-out Reset circuitry built into the PIC. If you have brown-out
protection circuitry on MCLR then externally switching Vdd to that circuit
should work fine. You can maintain the reset pulse for a short while after
the PIC resets with another cap & resistor off the pin used to generate the
reset. Note that all TRIS bits are "1" after reset, meaning the pins are
inputs, something to keep in mind with self-induced resets.
A watchdog reset will have the same effect on the PIC as a MCLR reset (NOT
Vdd reset), so you might try intentionally "hanging" your PIC until the
watchdog resets it.
-Ed V.
Agile Controls
1998\12\22@162812
by
Harrison Cooper
if your micro is not initialized until it runs thru the part that
says....this port is an output, this is an input, etc (you know what I
mean), that pin you are driving may not be driven...or is actually holding
your clear low forever. Better would be two pins, gated so it only resets
when both conditions are true (or false..whichever).
1998\12\22@165306
by
D. Schouten
|
Hi All,
(I'm sorry if this message was posted twice. I received some errors)
I'm currently doing a project with a 16C73A in which I require a
software controlled MCLR reset. I need this because I have the
following problem :
When I power-up the PIC the software is running with no problems. When
for example a certain external voltage drop is detected on an A/D
channel (the total unit is battery powered, but the PIC is safely
supplied by a 7805 regulator), the software jumps to a subroutine.
When this external voltage is back to normal again, the software will
be reset by jumping out of the subroutine back to Start (address 0)
initializing all registers again etc. etc.
The problem is that after this 'soft-reset' I experience some problems
with my A/D conversions resulting in large conversion errors. When I
reset the processor by pulling down MCLR, everything works fine again.
So my question is, is it possible to (MCLR) reset the 16C73A just by
using some instructions?
Right now, I've connected an NPN transistor to RA4 to pull down MCLR
when I exit the above mentioned subroutine. But until this doesn't
work yet.
I hope you guys can help me out on this.
Bye,
Daniel...
1998\12\22@180549
by
David W. Duley
|
In a message dated 12/22/98 1:54:20 PM Pacific Standard Time,
RemoveMEdaniels
spamBeGoneXS4ALL.NL writes:
<< Hi All,
(I'm sorry if this message was posted twice. I received some errors)
I'm currently doing a project with a 16C73A in which I require a
software controlled MCLR reset. I need this because I have the
following problem :
When I power-up the PIC the software is running with no problems. When
for example a certain external voltage drop is detected on an A/D
channel (the total unit is battery powered, but the PIC is safely
supplied by a 7805 regulator), the software jumps to a subroutine.
When this external voltage is back to normal again, the software will
be reset by jumping out of the subroutine back to Start (address 0)
initializing all registers again etc. etc.
The problem is that after this 'soft-reset' I experience some problems
with my A/D conversions resulting in large conversion errors. When I
reset the processor by pulling down MCLR, everything works fine again.
So my question is, is it possible to (MCLR) reset the 16C73A just by
using some instructions?
Right now, I've connected an NPN transistor to RA4 to pull down MCLR
when I exit the above mentioned subroutine. But until this doesn't
work yet.
I hope you guys can help me out on this.
Bye,
Daniel...
>>
why don't you just jump to a routine that doesn't clear the wdt? The result
is a hardware reset without hardware.
Dave Duley
1998\12\23@065128
by
Dr. Imre Bartfai
|
On Tue, 22 Dec 1998, D. Schouten wrote:
{Quote hidden}> Hi All,
>
> I'm currently doing a project with a 16C73A in which I require a
> software controlled MCLR reset. I need this because I have the
> following problem :
>
> When I power-up the PIC the software is running with no problems. When
> for example a certain external voltage drop is detected on an A/D
> channel (the total unit is battery powered, but the PIC is safely
> supplied by a 7805 regulator), the software jumps to a subroutine.
> When this external voltage is back to normal again, the software will
> be reset by jumping out of the subroutine back to Start (address 0)
> initializing all registers again etc. etc.
> The problem is that after this 'soft-reset' I experience some problems
> with my A/D conversions resulting in large conversion errors. When I
> reset the processor by pulling down MCLR, everything works fine again.
>
> So my question is, is it possible to (MCLR) reset the 16C73A just by
> using some instructions?
> Right now, I've connected an NPN transistor to RA4 to pull down MCLR
> when I exit the above mentioned subroutine. But until this doesn't
> work yet.
I guess the idea is good. However, RA4 can't pull down MCLR wia NPN
because of RA4 is an open-collector output. Either choose another pin, or
pull down MCLR with RA4 directly (ugh).
>
> I hope you guys can help me out on this.
>
> Bye,
>
> Daniel...
>
>
1998\12\23@102534
by
paulb
|
D. Schouten wrote:
> (I'm sorry if this message was posted twice. I received some errors)
Dear me, can we possibly have a line or two added in the introductory
list message to point out that if you receive a "message undeliverable"
message after posting to PICLIST (as is presently happening from the
dreaded "spamBeGoneUNDELIVERABLEKILLspam
@spam@SPEASTECH.COM"), *NEVER* to re-post the message?
I mean, if it is undeliverable, why send it again, eh? Eh?
> I'm currently doing a project with a 16C73A in which I require a
> software controlled MCLR reset. I need this because I have the
> following problem :
"Need" is not quite the right word here! I'm afraid I have some
problems with the "if it doesn't fit, hammer it harder" style of
engineering implicit in both of these quotes. I wonder what happens if
you later decide you really *do* want more than one set of readings
between hardware resets?
When I was taught "C", one of the big plus-es (this was before C++ ;-)
was the lack of a "goto" statement. I suspect tutors/ lecturers still
wax lyrical on this.
> When this external voltage is back to normal again, the software will
> be reset by jumping out of the subroutine back to Start (address 0)
> initializing all registers again etc. etc.
Forth provides one, and one only, big GOTO. This re-initialises
everything by re-starting the program, similar to GOTO 0 on most
processors. But this is an "exception" and specifically returns the
system to user control. As a deliberate part of the program, even *I*,
spaghetti coder extraordinaire, think this is very poor.
> The problem is that after this 'soft-reset' I experience some problems
> with my A/D conversions resulting in large conversion errors. When I
> reset the processor by pulling down MCLR, everything works fine again.
This certainly indicates that you are being extremely lazy, not
learning how to set up the ADC properly. You really need to look at the
manual and read and re-read it until you *understand* every part of the
ADC operation and can write the code to initialise everything.
As a hint, pay particular atttention to providing settling time delays
before a conversion, as one thing a hardware reset does provide is an
effective settling time.
> Right now, I've connected an NPN transistor to RA4 to pull down MCLR
> when I exit the above mentioned subroutine. But until this doesn't
> work yet.
It's not entirely obvious what you mean, but it's significant that RA4
is an open-collector driver on many/ most? devices, so if you expect it
to drive an NPN transistor, you may wait a l-o-n-g time! OTOH, if you
connect it *directly* to MCLR, it should work fine! *If* that's really
what you want.
--
Cheers,
Paul B.
1998\12\23@173014
by
James Cameron
Paul B. Webster VK2BZC wrote:
> When I was taught "C", one of the big plus-es (this was before C++ ;-)
> was the lack of a "goto" statement. I suspect tutors/ lecturers still
> wax lyrical on this.
Um, C has a "goto". Are you thinking of PASCAL?
main()
{
loop:
thing();
goto loop;
}
Admittedly you don't often _need_ to use a "goto".
main()
{
while(1) thing();
}
But I think it is not as evil as setjmp() and longjmp().
--
James Cameron (cameronspam_OUT
@spam@stl.dec.com)
OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
"Specialisation is for insects." -- Robert Heinlein.
1998\12\23@175113
by
paulb
James Cameron wrote:
> Um, C has a "goto". Are you thinking of PASCAL?
OK, you got me there :) It's been a while!
> But I think it is not as evil as setjmp() and longjmp().
Is that a sort of takeajmp() ?
--
Cheers,
Paul B.
1998\12\23@181021
by
Gerhard Fiedler
At 09:18 12/24/98 +1100, James Cameron wrote:
>But I think it is not as evil as setjmp() and longjmp().
and not half as useful either... in most cases where one would use a goto,
you could make it without it also, but try to do the same thing you do with
setjmp() without it...
ge
1998\12\23@184213
by
James Cameron
|
Paul B. Webster VK2BZC wrote:
> James Cameron wrote:
> > But I think it is not as evil as setjmp() and longjmp().
> Is that a sort of takeajmp() ?
setjmp() marks a point in your code.
longjmp() can be used anywhere in the code to unwind the stack, all
stack allocated variables, and resume execution after the setjmp().
It is sort of a steroidal or global goto; can be used in any part of a
program, not just within a function.
I imagine it would be difficult to implement on PIC ... requires ability
to unwind (pop) the stack. Means the compiler would have had to
implement the stack as a set of file registers.
--
James Cameron (spamBeGonecameron@spam@
stl.dec.com)
OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
"Specialisation is for insects." -- Robert Heinlein.
1998\12\23@184421
by
J Nagy
> So my question is, is it possible to (MCLR) reset the 16C73A just by
> using some instructions?
> Right now, I've connected an NPN transistor to RA4 to pull down MCLR
> when I exit the above mentioned subroutine. But until this doesn't
> work yet.
>
> I hope you guys can help me out on this.
>
> Bye,
>
> Daniel...
> >>
>why don't you just jump to a routine that doesn't clear the wdt? The result
>is a hardware reset without hardware.
>
>Dave Duley
Even simpler would be a jump to your initialization routine(s). If these
are complete, you really shouldn't have any need for a hardware reset.
Perhaps you missed something in your initial attempt (a register clear or
some such thing) that a MCLR does for you.
Jim Nagy
Elm Electronics
Makers of unique integrated circuits
http://www.elmelectronics.com/
1998\12\23@192653
by
Mark Willis
|
James Cameron wrote:
{Quote hidden}>
> Paul B. Webster VK2BZC wrote:
> > When I was taught "C", one of the big plus-es (this was before C++ ;-)
> > was the lack of a "goto" statement. I suspect tutors/ lecturers still
> > wax lyrical on this.
>
> Um, C has a "goto". Are you thinking of PASCAL?
>
> main()
> {
> loop:
> thing();
> goto loop;
> }
>
> Admittedly you don't often _need_ to use a "goto".
>
> main()
> {
> while(1) thing();
> }
>
> But I think it is not as evil as setjmp() and longjmp().
>
> --
> James Cameron (
RemoveMEcameronEraseME
KILLspamstl.dec.com)
>
> OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
> COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
> Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
> Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
>
> "Specialisation is for insects." -- Robert Heinlein.
Ahem. Pascal (at least some implementations!) has a Goto, as well.
Turbo Pascal, for example <G>
(I don't remember if the UW's CDC Cyber type Pascal has one, as I have
a printout of the source somewhere I could go look someday but that's in
storage <G>)
The mere existence of something doesn't make it evil IMHO; MISUSE of
that thing, does. I don't do Basic, for this reason <G>
Mark
1998\12\24@080530
by
paulb
Dr. Imre Bartfai wrote:
> I guess the idea is good. However, RA4 can't pull down MCLR wia NPN
> because of RA4 is an open-collector output.
I believe I said the same, FWIW. This spooks me when we say the same
thing separately!
> Either choose another pin, or pull down MCLR with RA4 directly (ugh).
Precisely why is using RA4 "Ugh"? Being open-collector, it has
limited other uses, but is perfect for MCLR and it isn't going to be
activated prematurely as like other I/O, it defaults to input.
--
Cheers,
Paul B.
1998\12\24@080740
by
paulb
James Cameron wrote:
>>> But I think it is not as evil as setjmp() and longjmp().
>> Is that a sort of takeajmp() ?
> setjmp() marks a point in your code.
> longjmp() can be used anywhere in the code to unwind the stack, all
Err, yes. Can I mention that was tongue-in-cheek?
--
Cheers,
Paul B.
1998\12\28@090952
by
uter van ooijen / floortje hanneman
> Um, C has a "goto". Are you thinking of PASCAL?
Pascal has a goto, although its use is discouraged (even more than in C).
Wouter.
1998\12\28@095605
by
Andy Kunz
|
Any of you guys ever hear of a COMEFROM? It's like the opposite of a GOTO!
<G>
At 10:30 AM 12/24/98 +1100, you wrote:
{Quote hidden}>Paul B. Webster VK2BZC wrote:
>> James Cameron wrote:
>> > But I think it is not as evil as setjmp() and longjmp().
>> Is that a sort of takeajmp() ?
>
>setjmp() marks a point in your code.
>
>longjmp() can be used anywhere in the code to unwind the stack, all
>stack allocated variables, and resume execution after the setjmp().
>
>It is sort of a steroidal or global goto; can be used in any part of a
>program, not just within a function.
>
>I imagine it would be difficult to implement on PIC ... requires ability
>to unwind (pop) the stack. Means the compiler would have had to
>implement the stack as a set of file registers.
>
>--
>James Cameron (
spamBeGonecameronspam_OUT
RemoveMEstl.dec.com)
>
>OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
>COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
>Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
>Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
>
>"Specialisation is for insects." -- Robert Heinlein.
>
==================================================================
Andy Kunz - Montana Design - http://www.users.fast.net/~montana
==================================================================
'PC Hardware (again)'
1998\12\29@104154
by
Andy Kunz
How do I tell teh UART in a PC to speak even though the modem/handshake
lines tell it not to?
It looks like THAT is more of a problem than the IRQs were :-(
Andy
==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================
1998\12\29@135726
by
Gerhard Fiedler
At 10:37 12/29/98 -0500, Andy Kunz wrote:
>How do I tell teh UART in a PC to speak even though the modem/handshake
>lines tell it not to?
can you get more specific? AFAIK, all the handshake lines (RTS, CTS, DTR)
in normal UARTs are software controlled, but i've seen more advanced SCCs
which would allow to configure a hardware controlled handshake.
ge
1998\12\30@171850
by
Tom Handley
|
Andy, if you want to take over the PC's serial port in a
`non-multitasking-friendly' manner, here is a C `snippet' that I use:
>From the header file:
---------------------
/* Type Definitions */
typedef unsigned char UBYTE; /* Old habbit... */
...
/* Serial Port Definitions */
#define COM1_BASE 0x3F8 /* COM1 Base Address */
#define COM2_BASE 0x2F8 /* COM2 Base Address */
#define COM3_BASE 0x3E8 /* COM3 Base Address */
#define COM4_BASE 0x2E8 /* COM4 Base Address */
#define COM_BASE COM2_BASE /* COM Base Address */
/* Function Prototypes */
void InitUSART(void); /* Initialize USART */
void TxData(UBYTE); /* Transmit Data */
UBYTE RxData(void); /* Receive Data */
...
>From the application file:
--------------------------
Note, there are a lot of ways to do this. I use these routines as a
generic package and add sections relating to CTS/RTS and DTR/DSR as needed.
Also, they do not provide a time-out for a port that is not responding nor
do they use interrupts. I've used them up to 115.2K with handshaking
disabled. Works fine with a 20MHz PIC16C76/77 at 115.2K.
(BRGH = 1, SPBRG = 10). This is also the interface to my weather station and
my PIC-based logic analyzer which is in the prototype stage.
/*
InitUSART() - Initialize USART to 115200, 8 Data Bits, No Parity, 1 Stop
Bit
*/
void InitUSART(void)
{
outp(COM_BASE + 1, 0x00); /* Turn off interrupts */
outp(COM_BASE + 3, 0x83); /* Access Divisor Latch */
outp(COM_BASE + 0, 0x01); /* Set 115200 (115200/1) Baud */
outp(COM_BASE + 1, 0x00);
outp(COM_BASE + 3, 0x03); /* Access DFM reg. Configure Data Format */
outp(COM_BASE + 4, 0x03); /* Disable Loop, !OUTx. Enable !RTS, !DTR */
}
/*
TxData() - Send Data to Serial Port
Entry:
data = Data to transmit
*/
void TxData(UBYTE data)
{
UBYTE x;
do /* Check for Tx Buffer Empty */
{
x = inp(COM_BASE + 5);
x &= 0x20;
} while(x == 0);
outp(COM_BASE + 0, data); /* Send Data */
}
/*
RxData() - Receive Data from the Serial Port
Exit:
data = Rx Data
*/
UBYTE RxData(void)
{
UBYTE x, data;
while(TRUE) /* Check for Rx Data */
{
x = inp(COM_BASE + 5);
x &= 0x01;
if(x == 1)
{
data = inp(COM_BASE + 0); /* Get Data */
break;
}
if(kbhit()) /* Abort if Keypress */
{
getch();
printf("\n");
break;
}
}
return(data);
}
For Handshaking, I use the following:
/* Wait for !CTS */
do
{
x = inp(COM_BASE + 6);
x &= 0x10;
} while(x == 0);
/* Wait for !DSR */
do
{
x = inp(COM_BASE + 6);
x &= 0x20;
} while(x == 0);
/* Wait for !RI */
do
{
x = inp(COM_BASE + 6);
x &= 0x40;
} while(x == 0);
/* Wait for !DCD */
do
{
x = inp(COM_BASE + 6);
x &= 0x80;
} while(x == 0);
/* Disable !RTS */
x = inp(COM_BASE + 4);
x &= 0xFD;
outp(COM_BASE + 4, x);
/* Enable !RTS */
x = inp(COM_BASE + 4);
x |= 0x02;
outp(COM_BASE + 4, x);
/* Disable !DTR */
x = inp(COM_BASE + 4);
x &= 0xFE;
outp(COM_BASE + 4, x);
/* Enable !DTR */
x = inp(COM_BASE + 4);
x |= 0x01;
outp(COM_BASE + 4, x);
- Tom
At 10:37 AM 12/29/98 -0500, Andy Kunz wrote:
{Quote hidden}>How do I tell teh UART in a PC to speak even though the modem/handshake
>lines tell it not to?
>
>It looks like THAT is more of a problem than the IRQs were :-(
>
>Andy
>
>==================================================================
>Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
>==================================================================
>
>
1998\12\30@220145
by
chrispian khoo
|
>From .....owner-piclist
RemoveMEmitvma.mit.edu Tue Dec 29 15:27:17 1998
>Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by
walnut-backup.ease.lsoft.com (LSMTP for OpenVMS v1.1b) with SMTP id
<1.0001CB40
@spam@walnut-backup.ease.lsoft.com>; Tue, 29 Dec 1998 13:51:39
-0400
>Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV release 1.8c)
with
> NJE id 0131 for EraseMEPICLISTRemoveME
STOPspamMITVMA.MIT.EDU; Tue, 29 Dec 1998
13:57:26
> -0500
>Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail
> V1.2b/1.8b) with BSMTP id 9777; Tue, 29 Dec 1998 13:57:08
-0500
>Received: from ha1.rdc1.sdca.home.com [24.0.3.66] by mitvma.mit.edu
(IBM VM
> SMTP V2R4a) via TCP with SMTP ; Tue, 29 Dec 1998 13:57:07 EST
>X-Warning: mitvma.mit.edu: Host ha1.rdc1.sdca.home.com claimed to be
> mail.rdc1.sdca.home.com
>Received: from cx48592-a ([24.4.88.50]) by mail.rdc1.sdca.home.com
(InterMail
> v4.0 201-221-107) with SMTP id
> <19981229185657.YKKM29537.mail.rdc1.sdca.home.com@cx48592-a>
for
> <RemoveMEPICLISTKILLspam
TakeThisOuTMITVMA.MIT.EDU>; Tue, 29 Dec 1998 10:56:57 -0800
>X-Sender: lists@mail
>X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1
>Mime-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Message-ID: <4.1.19981229104948.0094e3b0@mail>
>Date: Tue, 29 Dec 1998 10:56:33 -0800
>Reply-To: pic microcontroller discussion list
<spamBeGonePICLIST
@spam@MITVMA.MIT.EDU>
>Sender: pic microcontroller discussion list
<RemoveMEPICLISTspam_OUT
MITVMA.MIT.EDU>
>From: Gerhard Fiedler <listsspam
HOME.COM>
>Subject: Re: PC Hardware (again)
>To: spam_OUTPICLISTspam_OUT
spam_OUTMITVMA.MIT.EDU
>In-Reply-To: <3.0.1.32.19981229103720.00691ca8spam_OUT
pop.fast.net>
>
>At 10:37 12/29/98 -0500, Andy Kunz wrote:
>>How do I tell teh UART in a PC to speak even though the
modem/handshake
>>lines tell it not to?
>
>can you get more specific? AFAIK, all the handshake lines (RTS, CTS,
DTR)
>in normal UARTs are software controlled, but i've seen more advanced
SCCs
>which would allow to configure a hardware controlled handshake.
>
>ge
>
Hey guys
Talking about the handshake lines in (RTS CTS DTR, do u have to program
the pic (example: pic16c73 in this case) to configure these lines, even
when you're not going to use it? What I'm saying is that I'll fixing up
a null modem for the RS232 cable, using only TX, RX & gnd.
Take the example below quoted from a tutorial application from
microchip,
It says, "We will also use RC5 and RA5 as the terminal handshake lines
RTS and CTS, although these signals are not used in this application.
Following convention though we will set RTS as an input and CTS will be
driven low. "
the codes:" ;RTS must be = 00 cts MUST = 00
BSF PORTC,5 ;RTS
BSF PORTA,5 ;CTS
Dazed & confused?
Bye
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
1998\12\30@230157
by
Gerhard Fiedler
At 19:01 12/30/98 -0800, chrispian khoo wrote:
>Talking about the handshake lines in (RTS CTS DTR, do u have to program
>the pic (example: pic16c73 in this case) to configure these lines, even
>when you're not going to use it? What I'm saying is that I'll fixing up
>a null modem for the RS232 cable, using only TX, RX & gnd.
>
>Take the example below quoted from a tutorial application from
>microchip,
>
>It says, "We will also use RC5 and RA5 as the terminal handshake lines
>RTS and CTS, although these signals are not used in this application.
>Following convention though we will set RTS as an input and CTS will be
>driven low. "
if you're not using these lines, you don't have to use them :-)
seriously, some comm apps expect something on the CTS input of the UART, so
it's usually a good thing to loop RTS (from PC UART) back to CTS (of PC
UART) if that might be the case. other than that you don't have to worry
about these handshake lines.
ge
'PC Hardware (again)'
1999\01\01@032221
by
paulb
|
Andy Kunz wrote:
> How do I tell the UART in a PC to speak even though the modem/
> handshake lines tell it not to?
So in summary, on the 8250 series, it is the other way around, your
software has to implement any handshake dependencies/ flow control you
require. It's all up to you!
Some early programs *may* require preconditions, such as valid DCD, to
send data (I used to use the Motorola 6850 which had this restriction)
but except for a "tied" application, these are now *obsolete*. (It was
in the event necessary to link out DCD in the 6850 - a totally useless
"feature".)
They have been rendered obsolete by the virtually universal adoption
of the Hayes Modem standard, which requires that the modem be commanded
in order to connect. When it is commanded it is of course, off line and
the DCD is necessarily "false".
Hayes modems do make certain expectations of the handshake lines, so
you do in practice need to provide suitable control of these, but all of
these may *if required* be disabled in the modem.
Basically, you provide the software support to suit the modem/
application, the UART places no restriction other than those sequence/
timing matters implicit in its buffering.
--
Cheers,
Paul B.
1999\01\04@023549
by
Dr. Imre Bartfai
Hi,
the UART in a PC WILL speak always if you want. The question is: how do
you tell it to it?
- if you write the data register (THRE/TSRE bits should be checked before
as they both must be 1), the data will be transmitted regardless of the
status of the handshake lines.
- if you use the BIOS services (INT 14h) use a loopback connector for
handshake lines (RTS-CTS, DSR-DTR-DCD)
- if you use something other, (some 3rd party routines) then RTFM.
All I wrote here is true using DOS.
I hope this helps.
Imre
On Tue, 29 Dec 1998, Andy Kunz wrote:
{Quote hidden}> How do I tell teh UART in a PC to speak even though the modem/handshake
> lines tell it not to?
>
> It looks like THAT is more of a problem than the IRQs were :-(
>
> Andy
>
> ==================================================================
> Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
> ==================================================================
>
>
'Software controlled Hardware reset....'
1999\01\05@081503
by
Dmitry Kiryashov
|
James Cameron wrote:
> setjmp() marks a point in your code.
>
> longjmp() can be used anywhere in the code to unwind the stack, all
> stack allocated variables, and resume execution after the setjmp().
>
> It is sort of a steroidal or global goto; can be used in any part of a
> program, not just within a function.
>
> I imagine it would be difficult to implement on PIC ... requires ability
> to unwind (pop) the stack. Means the compiler would have had to
> implement the stack as a set of file registers.
Hmm. What the problem to implement the stack of return's in software ?
Hint: movwf pcl,f (or movwf pclath,f) still work. ;-)
Back to original topic.
I think additional capacitor will be required. MCLR is pulled up
via resistor, connected through another resistor to RA4 and cap
from MCLR to ground. When RA4 are become low capaciotor is dis-
charged -> PIC'll reseted and RA4 become high again. The cap is
required to obtain some duration of low level at RA4 for instance
to reset simultaneously some external hardware. Also diod in parallel
with pull-up resistor will be helpful to quickly discharge the cap
when power is off.
;The example of code
bcf _gie
btfsc _gie
goto $-2
movlw 0xEF ;111_0_1111
tris PORTA
movwf PORTA
goto $ ;wait for reset
;
WBR Dmitry.
1999\01\05@113513
by
John Payson
|setjmp() marks a point in your code.
|longjmp() can be used anywhere in the code to unwind the stack, all
|stack allocated variables, and resume execution after the setjmp().
|It is sort of a steroidal or global goto; can be used in any part of a
|program, not just within a function.
|I imagine it would be difficult to implement on PIC ... requires ability
|to unwind (pop) the stack. Means the compiler would have had to
|implement the stack as a set of file registers.
Although it may be used in other places, setjmp() is probably used
most commonly within main(), a routine which is never going to return.
As a result, the stack contents are irrelevant. Although setjmp and
longjmp may not be practically implemented for the "general case",
there's no problem making a special-case version which requires that
the setjmp() call be performed within main().
1999\01\05@224430
by
James Cameron
John Payson wrote:
> Although it may be used in other places, setjmp() is probably used
> most commonly within main(), a routine which is never going to return.
Well, this makes it so easy then ...
setjmp() { return; }
longjmp() { main(); }
... so easy that it is not worth the effort of a compiler writer to do
it, document the non-standardness of it, and then put up with the
support issues that would result. ;-)
--
James Cameron (RemoveMEcameronKILLspam
@spam@stl.dec.com)
OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
"Specialisation is for insects." -- Robert Heinlein.
'Hardware/software joke [OT]'
1999\01\08@155356
by
John Payson
What's the difference between hardware and software?
[read between the X's for the answer]
XXASXTIMEXGOESXBYX,XHARDWAREXGETSXSMALLER,XFASTER,XANDXCHEAPER.XXXXXXX
XXSOFTWAREXGETSXBIGGER,XSLOWER,XANDXMOREXEXPENSIVE.XXXXXXXXXXXXXXXXXXX
Attachment converted: wonderland:WINMAIL.DAT 1 (????/----) (0002577F)
1999\01\08@160845
by
Dan Larson
On Fri, 8 Jan 1999 14:55:20 -0600, John Payson wrote:
>What's the difference between hardware and software?
>
>
>
>
>
>[read between the X's for the answer]
>
>XXASXTIMEXGOESXBYX,XHARDWAREXGETSXSMALLER,XFASTER,XANDXCHEAPER.XXXXXXX
>XXSOFTWAREXGETSXBIGGER,XSLOWER,XANDXMOREXEXPENSIVE.XXXXXXXXXXXXXXXXXXX
>
>
That's not a *joke* it is *TRUE*.........
1999\01\08@192134
by
Scott Shidel...
On Fri, 8 Jan 1999, John Payson wrote:
> What's the difference between hardware and software?
>
I have a serious question that I have been kinda embarrassed to ask, but
what the hell, here goes...
What the heck is "firmware"????
-----------------------------------------------------------------------
The Pinto Page: http://www.eng.usf.edu/~shidel
Join the Ford Turbo Mailing List!
http://www.FindMail.com/list/turbo/
Scott
-71 Pinto, stock 2.3 turbo, 13.67@98, radials
8.1@85 1/8th mile on slicks
-85 Merkur 13.764@98 on radials&3300lbs! Under $300 in mods!
------------------------------------------------------------------------
1999\01\08@193153
by
mwestfal
Scott Shidel... wrote:
> I have a serious question that I have been kinda embarrassed to ask, but
> what the hell, here goes...
> What the heck is "firmware"????
"Firmware" typically refers to software that has been burned into a read-only
device, such as a ROM, PROM, EPROM, EEPROM, etc.
I don't know whether programs on a CD-ROM count as "firmware" though...
-------------------------------------------------------------------------------
Mike
mwestfalspamBeGone
.....odc.net
http://web.csusb.edu/public/csci/mwestfal
Linux religious dogma: "The Gates of Hell shall not prevail."
-------------------------------------------------------------------------------
1999\01\11@032447
by
Dr. Imre Bartfai
On Fri, 8 Jan 1999, Dan Larson wrote:
> On Fri, 8 Jan 1999 14:55:20 -0600, John Payson wrote:
>
> >What's the difference between hardware and software?
> >
> >
> >
> >
> >
> >[read between the X's for the answer]
> >
> >XXASXTIMEXGOESXBYX,XHARDWAREXGETSXSMALLER,XFASTER,XANDXCHEAPER.XXXXXXX
> >XXSOFTWAREXGETSXBIGGER,XSLOWER,XANDXMOREXEXPENSIVE.XXXXXXXXXXXXXXXXXXX
> >
> >
>
> That's not a *joke* it is *TRUE*.........
>
>
Exactly THAT's why I get stuck at DOS and do not change to Windoze.
1999\01\12@173644
by
John Payson
> What's the difference between hardware and software?
|I have a serious question that I have been kinda embarrassed to ask, but
|what the hell, here goes...
|What the heck is "firmware"????
Somewhat obscene joke answer follows [don't say I didn't warn you]
XXXIT'SXWHATXMALEXSOFTWAREXTURNSXINTOXWHENXINXCLOSEXPROXIMITYXTOXXXXXX
XXXFEMALEXSOFTWAREXINXPREPARATIONXFORXHARDWARE/SOFTWAREXINTERFACINGXXX
'OT: Network hardware questions'
1999\01\13@195531
by
john pearson
I am new to networking. I want to connect my two computers together.
I am looking at a Eithernet starter kit with two 10/100 nics and a 10Mhz
hub. Will I really miss 100Mhz. I only want to share a printer and an
occasional file.
If I want to upgrade to a 100Mhz hub, will I be able to use any brand hub or
will I have to use the same brand as the nics.
Any good books for beginners, or web sites?
Thanks
John
1999\01\13@203435
by
Fansler, David
|
part 0 3053 bytes
There is no real magic in networking a couple (or a couple of
hundred) computers together. An ethernet starter kit is a good place for a
beginner to start. They usually include enough instructions to help you get
going. You will not miss the 100mbs hub speed. For most small networks,
10mbs is fine. Upgrading later to a 100 mbs hub is do-able by unplugging
your cables from the 10 mbs hub and plugging them into your 100 mbs hub.
You can use any brand hub or card, as long as they are speed compatible and
the same topology (unshielded twisted pair - UTP for example). Coax cannot
run 100 mbs, so stick with UTP.
As for getting started.
1. Install NIC in each computer.
2. Power on - if you are running Win95 or Win98 it should recognize that new
hardware is present and start to install. It may ask for the floppy that
comes with your NIC for drivers.
3. After installing the NIC, you need to load networking. Again, assuming
Win95-98 goto Control Panel/Networking.
You should see you NIC listed as installed.
4. From the Add button you need to add Client/Microsoft/Client for
Microsoft Networks.
5. From the Add button you need to add Protocol/Microsoft/NetBEUI.
6. Click on the button File and Print Sharing. Click yes to sharing files
and printers.
7. Click on the Identification tab. Give the computer a unique name (just
different from the other computer - one and two are fine!). Give them the
same Workgroup name - THIS IS CASE SENSITIVE - so make sure they are really
the same! And finally give them a Computer Description (i.e. development
computer, game computer)
8. Click on the Access Control Tab. Click on the Share-Level Access.
9. Close out and reboot. You will be asked for a user name and password
when Win95-98 starts backup. Enter any name (that you remember) and if you
do not want to mess with passwords, leave it blank. You will be asked to
confirm you password.
10. Cable the computers together. NIC -> HUB -> NIC. If the hub has a X
port, stay away from it. That is used to connect two hubs together and uses
different pin configuration than going from hub to nic.
Try your local book store for a reference. I am afraid I can not suggest
any.
Please feel free to email me privately if you need more help - I will be
delighted to help you as I can.
David V. Fansler
Network Administrator
AutoCyte, Inc.
336-222-9707 Ext. 261
KILLspamdfansler
.....autocyte.com
Now Showing! http://www.mindspring.com/~dfansler/
{Original Message removed}
1999\01\14@074638
by
Gregory Oleynikov
Hi John!
If there are only two computers on your network you need no hubs at all.
Just use a cross-wired patch cord to connect NICs. NIC full-duplex (if any)
option will work also.
Cross-wired connection:
10 MHz 100 MHz
1 ------- 3 1------- 3
2 -------- 6 2------- 6
3 -------- 1 3--------1
4--------4
5--------5
6 --------- 2 6------- 2
7------- 7
8--------8
Best regards
Gregory V.Oleynikov
john pearson wrote:
> I am new to networking. I want to connect my two computers together.
> I am looking at a Eithernet starter kit with two 10/100 nics and a 10Mhz
> hub. Will I really miss 100Mhz. I only want to share a printer and an
> occasional file.
> If I want to upgrade to a 100Mhz hub, will I be able to use any brand hub or
> will I have to use the same brand as the nics.
> Any good books for beginners, or web sites?
> Thanks
> John
1999\01\14@095331
by
lilel
|
> I am new to networking. I want to connect my two computers together.
I just did this in this fashion:
I bought two identical ethernet cards, had my office Network Guru
make me a cable (the one that looks like a phone plug that I don't
know the name of) that has a crossover (ala an old null modem cable)
and plug it into a WIN 95 machine. a few curses later, I had a
network! You don't need a hub to connect two machines.
With thin ethernet cable you would need cable, two tees, and two
75 ohm (I think?) terminations.
> I am looking at a Eithernet starter kit with two 10/100 nics and a
> 10Mhz hub. Will I really miss 100Mhz. I only want to share a printer
> and an occasional file. If I want to upgrade to a 100Mhz hub, will I
> be able to use any brand hub or will I have to use the same brand as
> the nics. Any good books for beginners, or web sites? Thanks John
-- Lawrence Lile
=> Median Filter Source Code
=> AutoCad blocks for electrical drafting
=> Brownout tester plans
=> Amateurish pictures of my family
at: http://home1.gte.net/llile/index.htm
1999\01\14@140254
by
calls
|
The coax style ethernet termnators should be 50 ohms. Although you
may get away with the 75 ohm variety for a couple machines, the 50
ohm terminatorscan be acquired easily as they're only as far
away as your local Radio Shack. Definitely get identical ethernet
cards-- you'll save a ton of time when you install and configure them
into your machines. If you use coax to connect your machines, you
don't need any crossover cable.
With Win95/8, you can use the windows networking stuff, with the
NETbui protocol. It allows you to share printers, files, etc.
Priority: normal
Date: Thu, 14 Jan 1999 08:51:04 +0000
Reply-to: spam_OUTlilel
KILLspamtoastmaster.com
From: Lawrence Lile <RemoveMElilelRemoveME
EraseMETOASTMASTER.COM>
Organization: toastmaster
Subject: Re: OT: Network hardware questions
To: KILLspamPICLIST
spamBeGoneMITVMA.MIT.EDU
> I am new to networking. I want to connect my two computers together.
I just did this in this fashion:
I bought two identical ethernet cards, had my office Network Guru
make me a cable (the one that looks like a phone plug that I don't
know the name of) that has a crossover (ala an old null modem cable)
and plug it into a WIN 95 machine. a few curses later, I had a
network! You don't need a hub to connect two machines.
With thin ethernet cable you would need cable, two tees, and two
75 ohm (I think?) terminations.
> I am looking at a Eithernet starter kit with two 10/100 nics and a
> 10Mhz hub. Will I really miss 100Mhz. I only want to share a printer
> and an occasional file. If I want to upgrade to a 100Mhz hub, will I
> be able to use any brand hub or will I have to use the same brand as
> the nics. Any good books for beginners, or web sites? Thanks John
-- Lawrence Lile
=> Median Filter Source Code
=> AutoCad blocks for electrical drafting
=> Brownout tester plans
=> Amateurish pictures of my family
at: http://home1.gte.net/llile/index.htm
1999\01\14@152323
by
uter van ooijen / floortje hanneman
|
Is there an equivalent "0-modem" possibility for transciever
connections (those D15 connectors with the shifting locks)?
regards,
Wouter
----------
> From: Gregory Oleynikov <GregOl
spamSOFT-WEST.RU>
> To: RemoveMEPICLISTspamBeGone
RemoveMEMITVMA.MIT.EDU
> Subject: Re: OT: Network hardware questions
> Date: Thursday, January 14, 1999 13:43
>
> Hi John!
> If there are only two computers on your network you need no hubs at
all.
> Just use a cross-wired patch cord to connect NICs. NIC full-duplex (if
any)
{Quote hidden}> option will work also.
>
> Cross-wired connection:
>
> 10 MHz 100 MHz
> 1 ------- 3 1------- 3
> 2 -------- 6 2------- 6
> 3 -------- 1 3--------1
> 4--------4
> 5--------5
> 6 --------- 2 6------- 2
> 7------- 7
> 8--------8
>
>
> Best regards
> Gregory V.Oleynikov
>
> john pearson wrote:
>
> > I am new to networking. I want to connect my two computers together.
> > I am looking at a Eithernet starter kit with two 10/100 nics and a
10Mhz
> > hub. Will I really miss 100Mhz. I only want to share a printer and an
> > occasional file.
> > If I want to upgrade to a 100Mhz hub, will I be able to use any brand
hub or
> > will I have to use the same brand as the nics.
> > Any good books for beginners, or web sites?
> > Thanks
> > John
1999\01\14@170940
by
Andy Kunz
At 09:17 PM 1/14/99 +0100, you wrote:
>Is there an equivalent "0-modem" possibility for transciever
>connections (those D15 connectors with the shifting locks)?
AUI port.
You guys should ALL download a copy of "The Hardware Book" from the net.
It's a collection of all kinds of cables, interfaces, pinouts, etc. that
are handy. I keep a shortcut on my desktop so I can grab it any time.
Sorry, no URL but Yahoo or similar should find it.
Andy
\-----------------/
\ /---\ /
\ | | / Andy Kunz
\ /---\ / Montana Design
/---------+ +---------\ http://www.montanadesign.com
| / |----|___|----| \ |
\/___| * |___\/ Go fast, turn right,
and keep the wet side down!
1999\01\14@173829
by
kfisk
>
> At 09:17 PM 1/14/99 +0100, you wrote:
> >Is there an equivalent "0-modem" possibility for transciever
> >connections (those D15 connectors with the shifting locks)?
>
> AUI port.
>
> You guys should ALL download a copy of "The Hardware Book"
> from the net.
> It's a collection of all kinds of cables, interfaces,
> pinouts, etc. that
> are handy. I keep a shortcut on my desktop so I can grab it any time.
Could you attach the shortcut to an email? or is it a short cut to the file
on your machine?
{Quote hidden}>
> Sorry, no URL but Yahoo or similar should find it.
>
> Andy
>
>
>
> \-----------------/
> \ /---\ /
> \ | | / Andy Kunz
> \ /---\ / Montana Design
> /---------+ +---------\
http://www.montanadesign.com
> | / |----|___|----| \ |
> \/___| * |___\/ Go fast, turn right,
> and keep the wet side down!
>
1999\01\14@232737
by
Tjaart van der Walt
|
Kevin Fisk wrote:
{Quote hidden}>
> >
> > At 09:17 PM 1/14/99 +0100, you wrote:
> > >Is there an equivalent "0-modem" possibility for transciever
> > >connections (those D15 connectors with the shifting locks)?
> >
> > AUI port.
> >
> > You guys should ALL download a copy of "The Hardware Book"
> > from the net.
> > It's a collection of all kinds of cables, interfaces,
> > pinouts, etc. that
> > are handy. I keep a shortcut on my desktop so I can grab it any time.
>
> Could you attach the shortcut to an email? or is it a short cut to the file
> on your machine?
>
> >
> > Sorry, no URL but Yahoo or similar should find it.
> >
> > Andy
I had a link from my web page until early last year. The
owner of the 'Hardware Book' was killed in a motorcycle
accident. His page went down a few days later. It was one
of the best sites on the net.
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
KILLspamtjaartspamBeGone
wasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : @spam@tjaartSTOPspam
@spam@sms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
'The Hardware Book is back!'
1999\01\14@233717
by
Tjaart van der Walt
There seems to be conflicting information on the
ownership of it, but I really don't care - it's back.
Every good piclister should have a bookmark pointing
to this site :
http://hwb.acc.umu.se/index.html
--
Friendly Regards /"\
\ /
Tjaart van der Walt X ASCII RIBBON CAMPAIGN
tjaartspamBeGone
spamBeGonewasp.co.za / \ AGAINST HTML MAIL
|--------------------------------------------------|
| WASP International |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
| Mobile : spamBeGonetjaart
sms.wasp.co.za (160 text chars) |
| http://www.wasp.co.za/~tjaart/index.html |
|Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973|
| WGS-84 : 26¡10.52'S 28¡06.19'E |
|--------------------------------------------------|
'OT: Network hardware questions'
1999\01\15@082742
by
Mark Willis
|
Wanted to give a quick answer: AUI cables resemble "yellow garden
hose", I'd use 10BaseT or 10Base2 before that stuff. It's thick, heavy,
and a pain.
I have a 10Base2 LAN here, works fine, with 2 8-port hubs for
visitors. The handiest thing I've found for 10Base2 is the "F" style
connector for plugging into your net card ("NIC"), instead of a "T"
type:
The Stem of the "F" goes into the NIC, the RG-58 50-ohm cables then
both come in / leave from the same direction.
The reason this is handy is that you no longer have to block something
else with coax on both sides (i.e. you cannot plug in a printer without
an extra hand to hold the LAN cable out of your way.) All Electronics
IIRC has these for $1.25 or $1 in quantity, I'm considering getting
about 20 and getting rid of my "T" connectors <G>
It is easier to upgrade 10BaseT installations to 100BaseT, admittedly
- (If you're renting and need to run 10 computers' Cat 5 cables hung
from the side of the hallway to a big hub, imagine the look on the
landlord's face.) When I first got into networking machines, 100BaseT
wasn't dreamed of yet, having a mix can work really well; Printing is
plenty fast here (I put a buffer on the old dot matrix printers to speed
up the print server, the laser doesn't need it.)
I agree fully that identical NICs is a good idea (Get spares if you
can, not that they go bad, but so visiting machines or new machines can
drop on the LAN quickly.)
If I were starting new, I'd go with 100BaseT if affordable, or 10BaseT
if not, so you can re-use cabling ($10 for NICs for 10BaseT isn't bad.)
Mark
wouter van ooijen / floortje hanneman wrote:
>
> Is there an equivalent "0-modem" possibility for transciever
> connections (those D15 connectors with the shifting locks)?
>
> regards,
> Wouter
>
> <snipped>
1999\01\15@092720
by
Philip Restuccia
|
There are a few mirror sites that still have the Hardware Book online;
I've just now verified them so you should have no problems getting
there:
http://hwb.acc.umu.se/index.html
http://www.dataplus.se/hwb/
http://www.sonic.net/~alanwall/hwb/hwb.html
Good luck! The Hardware Book is definitely a useful resource; I'm sorry
to hear about the owner, but I'm glad his work has not disappeared.
Phil
Tjaart van der Walt wrote:
{Quote hidden}>
> Kevin Fisk wrote:
> >
> > >
> > > At 09:17 PM 1/14/99 +0100, you wrote:
> > > >Is there an equivalent "0-modem" possibility for transciever
> > > >connections (those D15 connectors with the shifting locks)?
> > >
> > > AUI port.
> > >
> > > You guys should ALL download a copy of "The Hardware Book"
> > > from the net.
> > > It's a collection of all kinds of cables, interfaces,
> > > pinouts, etc. that
> > > are handy. I keep a shortcut on my desktop so I can grab it any time.
> >
> > Could you attach the shortcut to an email? or is it a short cut to the file
> > on your machine?
> >
> > >
> > > Sorry, no URL but Yahoo or similar should find it.
> > >
> > > Andy
>
> I had a link from my web page until early last year. The
> owner of the 'Hardware Book' was killed in a motorcycle
> accident. His page went down a few days later. It was one
> of the best sites on the net.
>
--
Philip Restuccia
Senior Principal Software Engineer
Periphonics Corporation
spam_OUTphilip.restucciaSTOPspam
peri.com
1999\01\15@095654
by
Sten Dahlgren
1999\01\15@151425
by
William Chops Westfield
There are AUI (15 pin tranceiver interface) equivilents of a 10baseT hub,
usually with some sort of upstream tap (In my office lab, I have a little
box with 4 AUI "DCE" ports and a 10baseT output.) This eliminates the
requirement for a tranceiver per port plus big yellow coax plus 2.5m required
separation. As far as I know, there is no AUI equivilent of the 10baseT
"crossover" cable that allows two systems to be connected with "just a
cable."
Given current ecconomics, it is probably cheaper to buy AUI 10baseT
Transceivers and the crossover cable (or hub.) The AUI interface has
become so uncommon that equipment that specifically deals with it has
not come down in price as much as the 10baseT stuff. (OTOH, this also
means that "data centers" all over are tearing out their old AUI-based
stuff and putting in 10baseT instead. You may be able to find USED
AUI concentrators and cables and such for very cheap indeed (well, I
have a big box of it.) If it's free, it might even be worth dealing
with the heavy cables and unreliable connectors :-))
BillW
cisco
1999\01\15@161557
by
paulb
William Chops Westfield wrote:
> As far as I know, there is no AUI equivilent of the 10baseT
> "crossover" cable that allows two systems to be connected with "just a
> cable."
The AUI connection contains power lines (to power the interface) and
*three* control pairs; two in one direction and one in the other. It's
a bit difficult to reconcile these with just a cable!
--
Cheers,
Paul B.
'Hardware/software joke [OT]'
1999\01\15@175928
by
Jurva-Markus Vehasmaa
|
If i remember correctly then Firmware is programm that is needed for device
to operate as planned. Whit out it. device is useless. In that point, My
computers bios is firmware, since it's needed for computer to start
working.
J.M. Vehasmaa
----------
> From: Mike Westfall <TakeThisOuTmwestfalspam
RemoveMEVORLON.ODC.NET>
> To: KILLspamPICLISTspam
spam_OUTMITVMA.MIT.EDU
> Subject: Re: Hardware/software joke [OT]
> Date: 9. tammikuuta 1999 2:31
>
> Scott Shidel... wrote:
> > I have a serious question that I have been kinda embarrassed to ask,
but
> > what the hell, here goes...
> > What the heck is "firmware"????
>
> "Firmware" typically refers to software that has been burned into a
read-only
> device, such as a ROM, PROM, EPROM, EEPROM, etc.
>
> I don't know whether programs on a CD-ROM count as "firmware" though...
>
----------------------------------------------------------------------------
---
> Mike
> mwestfalRemoveME
odc.net
> http://web.csusb.edu/public/csci/mwestfal
> Linux religious dogma: "The Gates of Hell shall not prevail."
>
----------------------------------------------------------------------------
---
'hardware pwm and how to change the frequency witho'
1999\01\15@190539
by
andre
Hi to all engineers,
I am working on 16c73a 4x4 keypad directly connected to pic with
4x20 serial LCD display by scott Edward direcly connected to UART
output.
the function of this unit is just a pwm that you can specify
the frequency and duty cycle.
I used 16x08 multiply routine to do duty cycle conversion 0-99 to 0-255
I tested works fine. now I am stock on frequency. when I change PR2
register to change the frequency also duty cycle gets changed. I like to
know
how should I take care of this problem. I was thinking to use external
clock
but timer2 doesn't have external driver. the only thing left is to
change the
timer2 prescaller but that is only 1,4,16. any help will highly
appreciated.
the frequency range I was thinking to be 100hz to 20 k.
Andre Abelian
1999\01\15@235636
by
Gerhard Fiedler
|
At 15:45 01/15/99 -0800, Andre Abelian wrote:
>the function of this unit is just a pwm that you can specify
>the frequency and duty cycle.
>I used 16x08 multiply routine to do duty cycle conversion 0-99 to 0-255
>I tested works fine. now I am stock on frequency. when I change PR2
>register to change the frequency also duty cycle gets changed. I like to
>know how should I take care of this problem.
when you change the frequency (by changing PR2), you change the maximum
count for timer 2, so you have to change the duty cycle register also, to
keep the same relation.
example (just the principle, i didn't take the +1 for PR2 into account):
for a certain frequency, the timer goes up to 100, and a 10% duty cycle
would be a value of 10. if you double the frequency, the timer goes only up
to 50, and so the duty cycle register has to be 5 for 10% duty cycle.
if you keep the prescaler constant, then with PR2, you set the total cycle
time, and with the CCPR1L (and the two extension bits) you set the duty
cycle =time=, not the duty cycle percent.
ge
'OT: Network hardware questions'
1999\01\16@051343
by
Lee Jones
|
>> Is there an equivalent "0-modem" possibility for transciever
>> connections (those D15 connectors with the shifting locks)?
If I recall correctly, the AUI (attachment unit interface)
spec uses 4 pairs. They are power out (AUI to transceiver),
data out (to transceiver), data in (from transceiver), and
collision detect (from transceiver).
You _might_ be able to make a null-modem AUI to AUI cable
using just the data-in and data-out pairs on both ends.
Lack of collision detect could be a problem. But in a setup
with only 2 machines, the collision rate might be low enough
that the upper level network protocols could cope with it.
Much easier to put an AUI to 10baseT transceiver on each
NIC and run a cross-over UTP cable between them.
> Wanted to give a quick answer: AUI cables resemble "yellow
> garden hose", I'd use 10BaseT or 10Base2 before that stuff.
Technically, the AUI cable is a (usually 4 pair) cable with a
DB15 male connector on one end and a DB15 female connector on
the other end. It hooks the AUI port on the NIC to a 10base5
(aka thick Ethernet) transceiver. It can be up to 40 meters.
It is also known as a transceiver cable or drop cable.
A 10base5 (Thick Ethernet) coax cable was usually orange (I
also worked with blue). It's about 1/2" outside diameter,
rigid, and has a black mark every 2.5 meters. You were only
supposed to place a tap at a marked location.
(It makes reasonable antenna cable for use up to ~900 MHz.)
Tapping into the cable was fun. It was a vampire tap. There
was a special tool [I think I could find mine if I looked].
It had a stepped drill bit. You twisted it against the coax
cable and it cut away the outer insulation, the braided shield,
and the center dielectric.
The transceiver's tap assembly then clamped around the coax.
A pin went through the hole you just drilled and poked into the
~0.08" (~2mm) diameter solid copper center conductor. Other
pins(?) made contact with the shield. Exciting part was ensuring
that you didn't short the center pin to the grounded shield braid
(which could take down the entire network).
> It's thick, heavy, and a pain.
10base5 (Thick Ethernet) coax cable is all of those things.
> I have a 10Base2 LAN here, works fine, with 2 8-port hubs for
> visitors. The handiest thing I've found for 10Base2 is the "F"
> style connector for plugging into your net card ("NIC"), instead
> of a "T" type:
> The Stem of the "F" goes into the NIC, the RG-58 50-ohm cables then
> both come in / leave from the same direction.
The ultimate Thinwire Ethernet system was probably made by DEC
(Digital Equipment Corp). Wallplate had 2 female BNCs on it.
You hooked the Thinwire coax to the back of the wallplate like
a you would to a T connector. When nothing was plugged into the
wallplate's socket, it passed the signal straight through.
There was a drop cable that went to the NIC. One end had a BNC
connector in the middle of a doubled-over piece of small diameter
50-ohm coax. The other end had a 1/2" thick by 1" by 1" connector.
Coax went from the wall connector to the BNC and back to the wall
connector. An outside jacket kept the overall diameter to about
the same size as a piece of RG58 coax. Very neat on the NIC end.
When you plugged the wall connector into the wallplate, the
mechanism broke the internal signal path, routed the Ethernet
signal out the coax to the BNC (i.e. NIC), and back in on the
other coax. It was Thinwire that was as easy to use as 10baseT.
Just quite a bit harder to install.
You basically built a distributed hub into your office walls --
one wallplate at a time.
> I agree fully that identical NICs is a good idea
I tend to buy ones from "name" manufacturers that have decent
web sites and continue to provide drivers as time passes. I've
found that a NIC is more likely to be removed from service due
to lack of a current driver than due to hardware failure.
Lee Jones
1999\01\17@051258
by
paulb
|
Shawn Call wrote:
> With Win95/8, you can use the windows networking stuff, with the
> NETbui protocol. It allows you to share printers, files, etc.
You can even use WIN95 *without* NetBeui, just using Internet-standard
TCP/IP which seems eminently sensible to me to simplify matters since I
use an internet gateway (Linux).
The only disadvantage I have noted is that the timeouts are a bit
long, so it takes the W95 "Client" a fair while to decide what machines
are *not* presently connected when you perform a network DIR call.
To run TCP/IP you have to allocate IP addresses to each machine from
the LAN address range 192.168.x.x , and list all machines in a file in
the Windows directory called LMHOSTS (no extension). e.g.
#------- File: LMHOSTS --------
192.168.1.101 BOBS
192.168.1.102 CAROLS
192.168.1.103 TEDS
192.168.1.110 ALICES
192.168.1.111 BACKROOM
#-------- etc. EOF ------------
The names are what you called the machines in the "Identification" tab
in Network setup, and the "Workgroup" must be common to all machines,
but these are much the same requirements for NetBeui.
Win95 does NOT seem to be case-sensitive regarding these names. YMMV.
Easy! Pity this information does not come (in usable form) with W95!
--
Cheers,
Paul B.
'[OT] Hardware access under Linux'
1999\01\19@170057
by
Scott Newell
Every once in a while, people discuss building PIC programmers or other
hardware for use under Linux. Now that I've got a Linux machine built up,
I'm interested in using the PC's serial and parallel ports to interface to
various devices, including some PIC projects.
Does anyone have any good links or pointers to this kind of low-level
device access? (I'm comfortable with C++, and I really don't want to deal
with the backwards AT&T-style x86 assembler syntax.)
Thanks in advance,
newell
1999\01\19@175008
by
James Cameron
Scott Newell wrote:
> Does anyone have any good links or pointers to this kind of low-level
> device access?
Yes, sure. Fetch picprg2.2 from
http://www.tatoosh.com/nexus/picpgmr.shtml for a simple example of
low-level access to the printer port under Linux. See the file lowlvl.c
within the package. No assembly code required.
I have adapted this code for my own use to program 12C509 chips.
--
James Cameron (EraseMEcameronSTOPspam
RemoveMEstl.dec.com)
OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.
"Specialisation is for insects." -- Robert Heinlein.
1999\01\20@070751
by
Bob Drzyzgula
|
On Tue, Jan 19, 1999 at 03:59:11PM -0600, Scott Newell wrote:
> Every once in a while, people discuss building PIC programmers or other
> hardware for use under Linux. Now that I've got a Linux machine built up,
> I'm interested in using the PC's serial and parallel ports to interface to
> various devices, including some PIC projects.
>
> Does anyone have any good links or pointers to this kind of low-level
> device access? (I'm comfortable with C++, and I really don't want to deal
> with the backwards AT&T-style x86 assembler syntax.)
Two good books that cover this topic are:
Linux Device Drivers by Alessandro Rubini (O'Reilly)
www.amazon.com/exec/obidos/ASIN/1565922921/qid%3D916832697/002-1508759-93
54633
and
Linux Kernel Internals 2/E, Edited by Michael Beck (Addison-Wesley)
www.amazon.com/exec/obidos/ASIN/0201331438/ref=sim_books/002-1508759-9354
633
In addition, the book
Programming the Parallel Port; Interfacing the PC for Data
Acquisition and Process Control by Dhananjay V. Gadre (R&D Books)
www.amazon.com/exec/obidos/ASIN/0879305134/qid=916833059/sr=1-2/002-15087
59-9354633
while mostly DOS-oriented, does have one chapter on
writing a Linux device driver for a parallel-port DAQ
application (beware, though, I found that this book
uses really funky jargon and diagrammatic conventions,
and is rife with typos. Still, if you can get past that,
there's a lot to learn from it).
Most of what goes on at that level is typically
done in ANSI C, rather than C++.
--Bob
--
============================================================
Bob Drzyzgula It's not a problem
spam_OUTbobRemoveME
EraseMEdrzyzgula.org until something bad happens
============================================================
1999\01\20@104910
by
Byron A Jeff
{Quote hidden}>
> On Tue, Jan 19, 1999 at 03:59:11PM -0600, Scott Newell wrote:
> > Every once in a while, people discuss building PIC programmers or other
> > hardware for use under Linux. Now that I've got a Linux machine built up,
> > I'm interested in using the PC's serial and parallel ports to interface to
> > various devices, including some PIC projects.
> >
> > Does anyone have any good links or pointers to this kind of low-level
> > device access? (I'm comfortable with C++, and I really don't want to deal
> > with the backwards AT&T-style x86 assembler syntax.)
>
> Two good books that cover this topic are:
>
> Linux Device Drivers by Alessandro Rubini (O'Reilly)
>
> and
>
> Linux Kernel Internals 2/E, Edited by Michael Beck (Addison-Wesley)
>
> In addition, the book
>
> Programming the Parallel Port; Interfacing the PC for Data
> Acquisition and Process Control by Dhananjay V. Gadre (R&D Books)
> www.amazon.com/exec/obidos/ASIN/0879305134/qid=916833059/sr=1-2/002-150
8759-9354633
{Quote hidden}>
> while mostly DOS-oriented, does have one chapter on
> writing a Linux device driver for a parallel-port DAQ
> application (beware, though, I found that this book
> uses really funky jargon and diagrammatic conventions,
> and is rife with typos. Still, if you can get past that,
> there's a lot to learn from it).
>
> Most of what goes on at that level is typically
> done in ANSI C, rather than C++.
Bob,
I'm thinking that the device driver level is a bit too far under the surface
for what Scott wants to do. Both parallel and serial interfaces are accessible
from the user level, the parallel port via the port interface, the serial
ports via the already excellent serial driver.
The Linux IO-Port programming Mini-Howto has more than enough information to
get started. It can be found at:
http://metalab.unc.edu/LDP/HOWTO/mini/IO-Port-Programming.html
As another poster pointed out the low level interface code for the Linux
based picprg by Brian Lane of Nexus computing:
http://www.tatoosh.com/nexus/picpgmr.shtml
is quite instructive.
For the most part a Linux driver is required under one of three conditions:
1) Interrupts are involved.
2) Timing is critical.
3) Access must be managed to multiple simultaneous users/applications
For simple stuff to the parallel port just use the user level I/O interface
and make the application setuid root (because I/O require root access).
BTW it may bear repeating (I haven't seen a Linux based environment discussion
lately) that a Linux based PIC environment is doable. Last semester I had one
of my students build a parallel port based 16[CF]84 programmer that uses
Nexus Computers picprog to program, Timo Rossi's picasm located:
http://www.iki.fi/trossi/pic/
for an assembler, and I experimented with Scott Dattalo's gpsim simulator at:
http://interstice.com/~sdattalo/gnupic/gpsim.html
Which works really well but I think need in addition to the complicated node
and waveform based pin simlation a really simple interface where you can just
set a pin high or low for input.
I banged out two quick light control projects over the holidays with this
setup and was extremely happy to finally retire my PICSTART/DOSEMU based
system that I was using earlier.
Next on my project list is adding a second 16C84 based programmer with a
serial interface which will program the rest of the PIC family.
I'm looking forward to hearing more about PIC and Linux integration here on
the list.
BAJ
1999\01\20@112427
by
erik
|
I ran across this the other day.
I haven't been able to download it though.
http://reality.sgi.com/jamesb/gpasm/
Erik
Byron A Jeff wrote:
{Quote hidden}>
> >
> > On Tue, Jan 19, 1999 at 03:59:11PM -0600, Scott Newell wrote:
> > > Every once in a while, people discuss building PIC programmers or other
> > > hardware for use under Linux. Now that I've got a Linux machine built up,
> > > I'm interested in using the PC's serial and parallel ports to interface to
> > > various devices, including some PIC projects.
> > >
> > > Does anyone have any good links or pointers to this kind of low-level
> > > device access? (I'm comfortable with C++, and I really don't want to deal
> > > with the backwards AT&T-style x86 assembler syntax.)
> >
> > Two good books that cover this topic are:
> >
> > Linux Device Drivers by Alessandro Rubini (O'Reilly)
> >
> > and
> >
> > Linux Kernel Internals 2/E, Edited by Michael Beck (Addison-Wesley)
> >
> > In addition, the book
> >
> > Programming the Parallel Port; Interfacing the PC for Data
> > Acquisition and Process Control by Dhananjay V. Gadre (R&D Books)
> > www.amazon.com/exec/obidos/ASIN/0879305134/qid=916833059/sr=1-2/002-1
508759-9354633
{Quote hidden}> >
> > while mostly DOS-oriented, does have one chapter on
> > writing a Linux device driver for a parallel-port DAQ
> > application (beware, though, I found that this book
> > uses really funky jargon and diagrammatic conventions,
> > and is rife with typos. Still, if you can get past that,
> > there's a lot to learn from it).
> >
> > Most of what goes on at that level is typically
> > done in ANSI C, rather than C++.
>
> Bob,
>
> I'm thinking that the device driver level is a bit too far under the surface
> for what Scott wants to do. Both parallel and serial interfaces are accessible
> from the user level, the parallel port via the port interface, the serial
> ports via the already excellent serial driver.
>
> The Linux IO-Port programming Mini-Howto has more than enough information to
> get started. It can be found at:
>
>
http://metalab.unc.edu/LDP/HOWTO/mini/IO-Port-Programming.html
>
> As another poster pointed out the low level interface code for the Linux
> based picprg by Brian Lane of Nexus computing:
>
>
http://www.tatoosh.com/nexus/picpgmr.shtml
>
> is quite instructive.
>
> For the most part a Linux driver is required under one of three conditions:
>
> 1) Interrupts are involved.
> 2) Timing is critical.
> 3) Access must be managed to multiple simultaneous users/applications
>
> For simple stuff to the parallel port just use the user level I/O interface
> and make the application setuid root (because I/O require root access).
>
> BTW it may bear repeating (I haven't seen a Linux based environment discussion
> lately) that a Linux based PIC environment is doable. Last semester I had one
> of my students build a parallel port based 16[CF]84 programmer that uses
> Nexus Computers picprog to program, Timo Rossi's picasm located:
>
>
http://www.iki.fi/trossi/pic/
>
> for an assembler, and I experimented with Scott Dattalo's gpsim simulator at:
>
>
http://interstice.com/~sdattalo/gnupic/gpsim.html
>
> Which works really well but I think need in addition to the complicated node
> and waveform based pin simlation a really simple interface where you can just
> set a pin high or low for input.
>
> I banged out two quick light control projects over the holidays with this
> setup and was extremely happy to finally retire my PICSTART/DOSEMU based
> system that I was using earlier.
>
> Next on my project list is adding a second 16C84 based programmer with a
> serial interface which will program the rest of the PIC family.
>
> I'm looking forward to hearing more about PIC and Linux integration here on
> the list.
>
> BAJ
1999\01\20@120137
by
Scott Dattalo
|
with respect to parallel port Linux drivers,
On Wed, 20 Jan 1999, Byron A Jeff wrote:
> For simple stuff to the parallel port just use the user level I/O interface
> and make the application setuid root (because I/O require root access).
True. In fact, The person working on hacking the PicStart+ protocol has
been successful capturing the data flowing on the serial line between a PC
(running windows) and the programmer. Then he could cat that data from
Linux directly to the Picstart+ and get the programmer to respond! All of
this without writing any special drivers or even needing an oscilloscope.
> BTW it may bear repeating (I haven't seen a Linux based environment discussion
> lately) that a Linux based PIC environment is doable. Last semester I had one
That's because most of the Linux based pic development discussion has
moved to the gnupic mailing list. Here lately though, the only traffic has
pretty much been gpsim release announcements.
> of my students build a parallel port based 16[CF]84 programmer that uses
> Nexus Computers picprog to program, Timo Rossi's picasm located:
> http://www.iki.fi/trossi/pic/
That is a very nice assembler. However, I would recommend gpasm instead
since it accepts mpasm formatted source files without modification:
http://reality.sgi.com/jamesb/gpasm/
> for an assembler, and I experimented with Scott Dattalo's gpsim simulator at:
>
> http://interstice.com/~sdattalo/gnupic/gpsim.html
>
> Which works really well but I think need in addition to the complicated node
> and waveform based pin simlation a really simple interface where you can just
> set a pin high or low for input.
The stimulation interface is way too complicated.... I will be addressing
this issue shortly. In the mean time however, I've begun hacking gpasm to
provide symbolic information that may be used by gpsim. In the next
release I expect to add commands that will allow one to view source and
list files and set breakpoints symbolically. Incidentally, I've also begun
devoping a gui based register viewer. I probably will not have that
available in the next gpsim release though.
> I banged out two quick light control projects over the holidays with this
> setup and was extremely happy to finally retire my PICSTART/DOSEMU based
> system that I was using earlier.
>
> Next on my project list is adding a second 16C84 based programmer with a
> serial interface which will program the rest of the PIC family.
Great! I'll be looking forward to that!
> I'm looking forward to hearing more about PIC and Linux integration here on
> the list.
Me too. However, many of us prefer to have the detailed discussions on the
GNUPIC mailing list. Go to the gnupic webpage on info how to subscribe.
http://reality.sgi.com/jamesb/gnupic/
(The traffic is 2.5 orders of magnitude lower)
Scott
'Hardware or software problem???'
1999\02\17@143140
by
John Esposito
|
I am a beginner at PIC programming and built a test circuit using the
16C84. The circuit uses a magnetic switch for an input and when the switch
closes, and LED and piezo buzzer turn on. Simple right? Well, not for me!
Here is the problem: when I physically move closer to the breadboard (with
the mag switch open), the LED turns on (but not the buzzer), getting
brighter as I get closer to the breadboard. Once this happens, the
operation of the circuit is all messed up. If I close the switch,
sometimes the LED goes on, sometimes the buzzer sounds, sometimes both, and
sometimes the LED works opposite, i.e. when the switch is open, the LED is
ON, and vice-versa.
Brief description on the circuit: 10 MHz Crystal (ECS) w/ 33 pF caps
directly to ground; PORTA<0> switch input, PORTA<1> led output, PORTA<2>
piezo output.
LED output feeds an 74HC04 inverter; output of inverter to LED cathode; LED
anode through 100 ohm resistor to +5V. All unused 74HC04 inputs direct to
ground. All unused PIC I/O are configured as outputs and left unconnected
to anything. !MCLR pulled up to +5V.
As for hardware, I configure the I/O ports on reset, and basically run a
tight loop scanning the inputs, and changing the outputs based on the
input.
Any ideas? Hardware or software? I can't do much else until I figure out
what is going on here.
Thanks in advance for the help.
--John
1999\02\17@145709
by
Steven Kosmerchock
1999\02\17@150534
by
John Esposito
1999\02\17@151155
by
Quentin
Meet PICcy, your friendly ghost. :)
I know you said you configured all unused pins as outputs, but this
still looks very much like you getting interference through a floating
input. Double check that. Also check RB4.
Could be your breadboard is having a bad connection.
Do you have a pullup/pulldown resistor on your switch input?
As a test, make all unused pins as input and connect them to ground.
connect the case of your Xtal to ground.
And, I don't think it is your problem, but you don't need the 74HC04 to
drive the LED, you can do that direct from the PIC pin via a 680 ohm
resistor.
Just a few things I can think of.
Quentin
1999\02\17@153959
by
andre
|
John,
1. do you have pull up resister on porta,0.
2. how are you driving the buzzer. you should
use a transistor with it.
so far is hardware problem unless you didn't mention all this.
Andre
John Esposito wrote:
{Quote hidden}> I am a beginner at PIC programming and built a test circuit using the
> 16C84. The circuit uses a magnetic switch for an input and when the switch
> closes, and LED and piezo buzzer turn on. Simple right? Well, not for me!
>
> Here is the problem: when I physically move closer to the breadboard (with
> the mag switch open), the LED turns on (but not the buzzer), getting
> brighter as I get closer to the breadboard. Once this happens, the
> operation of the circuit is all messed up. If I close the switch,
> sometimes the LED goes on, sometimes the buzzer sounds, sometimes both, and
> sometimes the LED works opposite, i.e. when the switch is open, the LED is
> ON, and vice-versa.
>
> Brief description on the circuit: 10 MHz Crystal (ECS) w/ 33 pF caps
> directly to ground; PORTA<0> switch input, PORTA<1> led output, PORTA<2>
> piezo output.
> LED output feeds an 74HC04 inverter; output of inverter to LED cathode; LED
> anode through 100 ohm resistor to +5V. All unused 74HC04 inputs direct to
> ground. All unused PIC I/O are configured as outputs and left unconnected
> to anything. !MCLR pulled up to +5V.
>
> As for hardware, I configure the I/O ports on reset, and basically run a
> tight loop scanning the inputs, and changing the outputs based on the
> input.
>
> Any ideas? Hardware or software? I can't do much else until I figure out
> what is going on here.
>
> Thanks in advance for the help.
>
> --John
1999\02\17@170222
by
Graeme Smith
|
Hmmm..... Sounds like you have an antenna there ;)
I remember very little, being the guy everyone wanted to sit in one
special corner so they could watch Dalt Wisney on the Boob Toob. It seemed
that everytime I got up to go to the bathroom, the picture would fuzz out.
GREY
P.S. GroundLoop?
GRAEME SMITH email: grysmithKILLspam
EraseMEfreenet.edmonton.ab.ca
YMCA Edmonton
Address has changed with little warning!
(I moved across the hall! :) )
Email will remain constant... at least for now.
On Wed, 17 Feb 1999, John Esposito wrote:
{Quote hidden}> I am a beginner at PIC programming and built a test circuit using the
> 16C84. The circuit uses a magnetic switch for an input and when the switch
> closes, and LED and piezo buzzer turn on. Simple right? Well, not for me!
>
> Here is the problem: when I physically move closer to the breadboard (with
> the mag switch open), the LED turns on (but not the buzzer), getting
> brighter as I get closer to the breadboard. Once this happens, the
> operation of the circuit is all messed up. If I close the switch,
> sometimes the LED goes on, sometimes the buzzer sounds, sometimes both, and
> sometimes the LED works opposite, i.e. when the switch is open, the LED is
> ON, and vice-versa.
>
> Brief description on the circuit: 10 MHz Crystal (ECS) w/ 33 pF caps
> directly to ground; PORTA<0> switch input, PORTA<1> led output, PORTA<2>
> piezo output.
> LED output feeds an 74HC04 inverter; output of inverter to LED cathode; LED
> anode through 100 ohm resistor to +5V. All unused 74HC04 inputs direct to
> ground. All unused PIC I/O are configured as outputs and left unconnected
> to anything. !MCLR pulled up to +5V.
>
> As for hardware, I configure the I/O ports on reset, and basically run a
> tight loop scanning the inputs, and changing the outputs based on the
> input.
>
> Any ideas? Hardware or software? I can't do much else until I figure out
> what is going on here.
>
> Thanks in advance for the help.
>
> --John
>
1999\02\17@182633
by
Mike Keitz
On Wed, 17 Feb 1999 14:24:12 -0500 John Esposito
<EraseMEJohn_Esposito@spam@
@spam@DADEBEHRING.COM> writes:
>Any ideas? Hardware or software? I can't do much else until I figure
>out
>what is going on here.
You didn't say anything about having a pullup or pulldown resistor on the
switch input. If the switch is just a single pole, single throw one,
when it is open the PIC input is floating. The floating input picks up
noise which gets worse as you get close to the circuit.
If your switch is from Vdd to the input, connect a resistor (10K or so)
from the input to ground to be sure the input stays low while the switch
is open.
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]
1999\02\17@190638
by
Byron A Jeff
{Quote hidden}>
> I am a beginner at PIC programming and built a test circuit using the
> 16C84. The circuit uses a magnetic switch for an input and when the switch
> closes, and LED and piezo buzzer turn on. Simple right? Well, not for me!
>
> Here is the problem: when I physically move closer to the breadboard (with
> the mag switch open), the LED turns on (but not the buzzer), getting
> brighter as I get closer to the breadboard. Once this happens, the
> operation of the circuit is all messed up. If I close the switch,
> sometimes the LED goes on, sometimes the buzzer sounds, sometimes both, and
> sometimes the LED works opposite, i.e. when the switch is open, the LED is
> ON, and vice-versa.
>
> Brief description on the circuit: 10 MHz Crystal (ECS) w/ 33 pF caps
> directly to ground; PORTA<0> switch input, PORTA<1> led output, PORTA<2>
> piezo output.
> LED output feeds an 74HC04 inverter; output of inverter to LED cathode; LED
> anode through 100 ohm resistor to +5V. All unused 74HC04 inputs direct to
> ground. All unused PIC I/O are configured as outputs and left unconnected
> to anything. !MCLR pulled up to +5V.
>
> As for hardware, I configure the I/O ports on reset, and basically run a
> tight loop scanning the inputs, and changing the outputs based on the
> input.
>
> Any ideas? Hardware or software? I can't do much else until I figure out
> what is going on here.
Hardware. Specifically the piezo. What's the current rating on it? The voltage?
PIC output lines can only source/sink 25ma. I'm pretty sure the buzzer takes
more than that.
Quick test: remove the buzzer and replace it with another LED and current
limiting resistor. Retest and see if the same erratic behavior occurs.
One last thing: switches bounce. You have to have some sort of hysteresis
to counteract the bounce. This is either checking the switch state for
stability for 50 milliseconds or so, or acting instantly to the switch change
but delaying more than 50 milliseconds before checking the switch again.
I have a basement light project that is quite similar to yours. The opening
of the magnetic door switch turns on the lights. My hysteresis delays checking
the switch again for 90 seconds. Works like a champ.
BTW on this project I use an optoisolated output to drive the relay that
turns the light on. That's why I suggest testing with another LED. If that
works you can then use an optoisolator with a higher current drive to drive
the buzzer.
Hope that helps,
BAJ
1999\02\18@083736
by
John Esposito
|
Thanks a great deal to all who gave me suggestions. I changed the unused
PIC I/O from outputs to inputs, and tied them all to ground. The circuit
works like a champ! I tried to re-create the problem, but I had no
"success" (prior, the problem was easily reproducible).
FYI, I know I forgot to mention some things about the HW design. All
along, my mag switch, when open, is pulled up to 5V and closes to ground.
The switch is not debounced, though I will implement a design utilizing an
R/S flip-flop.
Thanks again to all who responded! I hope you all will be as much help in
the future.
Best regards,
--John
Quentin <@spam@qscspam
KILLspamICON.CO.ZA> on 02/17/99 03:11:14 PM
Please respond to pic microcontroller discussion list
<spamBeGonePICLISTRemoveME
EraseMEMITVMA.MIT.EDU>
To: RemoveMEPICLISTKILLspam
RemoveMEMITVMA.MIT.EDU
cc: (bcc: John Esposito/gg/DadeInt)
Subject: Re: Hardware or software problem???
Meet PICcy, your friendly ghost. :)
I know you said you configured all unused pins as outputs, but this
still looks very much like you getting interference through a floating
input. Double check that. Also check RB4.
Could be your breadboard is having a bad connection.
Do you have a pullup/pulldown resistor on your switch input?
As a test, make all unused pins as input and connect them to ground.
connect the case of your Xtal to ground.
And, I don't think it is your problem, but you don't need the 74HC04 to
drive the LED, you can do that direct from the PIC pin via a 680 ohm
resistor.
Just a few things I can think of.
Quentin
1999\02\18@151444
by
Stan Ockers
|
Subject: Time: 1:58
PM
hardware or software
2/18/99
Date:
In a recent thread, (hardware or software), there seem to be a final
conclusion that an I/O pin was floating and that the solution was to program
all unused I/O pins as inputs and wire them to ground (Vss). I always used
to think that programming unused I/O pins as outputs would be enough.
Isn't it possible that this is still true for all pins except Port A bit 4
(RA4)?
In all the other cases the I/O pin when an output is connected to a data
latch and is pulled to eithe Vdd or Vss. Since the TTL input buffer is
also connected to the I/O pin, it will be pulled either high or low.
The only exception is RA4 which is an open drain. The data latch can't
pull it to Vdd, only to Vss. So, isn't the conclusion then: put a resistor
on RA4 to Vdd and program it to output or program RA4 to input and wire
the pin to Vss or Vdd? All other unused I/O pins can be just set to
output,(or set to input and wired high or low as proposed). No?
BTW, does TTL input mean that actual bipolar transistors are used on the
chip?
Stan
1999\02\18@180104
by
Gabriel Gonzalez
|
>Thanks a great deal to all who gave me suggestions. I changed the unused
>PIC I/O from outputs to inputs, and tied them all to ground. The circuit
>works like a champ! I tried to re-create the problem, but I had no
>"success" (prior, the problem was easily reproducible).
>
>FYI, I know I forgot to mention some things about the HW design. All
>along, my mag switch, when open, is pulled up to 5V and closes to ground.
>The switch is not debounced, though I will implement a design utilizing an
>R/S flip-flop.
You don't need any hardware, you can debounce by software.
Gabriel
{Quote hidden}>
>Thanks again to all who responded! I hope you all will be as much help in
>the future.
>
>Best regards,
>
>--John
>
>
>
>
>
>Quentin <
TakeThisOuTqsc
ICON.CO.ZA> on 02/17/99 03:11:14 PM
>
>Please respond to pic microcontroller discussion list
> <
spamBeGonePICLISTKILLspam
TakeThisOuTMITVMA.MIT.EDU>
>
>To:
EraseMEPICLIST.....
KILLspamMITVMA.MIT.EDU
>cc: (bcc: John Esposito/gg/DadeInt)
>Subject: Re: Hardware or software problem???
>
>
>
>
>Meet PICcy, your friendly ghost. :)
>
>I know you said you configured all unused pins as outputs, but this
>still looks very much like you getting interference through a floating
>input. Double check that. Also check RB4.
>Could be your breadboard is having a bad connection.
>Do you have a pullup/pulldown resistor on your switch input?
>As a test, make all unused pins as input and connect them to ground.
>connect the case of your Xtal to ground.
>And, I don't think it is your problem, but you don't need the 74HC04 to
>drive the LED, you can do that direct from the PIC pin via a 680 ohm
>resistor.
>
>Just a few things I can think of.
>Quentin
1999\02\20@220711
by
paulb
|
Hello Stan.
> So, isn't the conclusion then: put a resistor on RA4 to Vdd and
> program it to output
Yes.
> or program RA4 to input and wire the pin to Vss or Vdd?
No.
> All other unused I/O pins can be just set to output,
Yes.
> or set to input and wired high or low as proposed. No?
No.
If you wire *any* I/O pin to a fixed level (except RA4 to ground),
you do two very bad things. First, you waste a pin, preventing you from
using that pin for adding a useful feature (such as a dignostic = LED
and resistor to Vdd).
Secondly, you set up the possibility of that pin being written to an
output of the opposite state, and creating a short circuit across the
supply. Sure, it may limit to 100mA or so, and the chips are reputed to
be *tough*, but ... do you really *want* that possibility?
> BTW, does TTL input mean that actual bipolar transistors are used on
> the chip?
No way! It just means the input threshold is warped to 1.5V at 5V Vdd
instead of 2.5V.
--
Cheers,
Paul B.
'Q:Dontronics/Wirz Programmer Hardware'
1999\04\11@120340
by
Kirby Powell
Hi all -
I am newbie to the PIC world, after working with Z80 and 8080 years ago.
After surfing the web, I decided on the Dontronics/Wirz programmer
development system and SIMM Sticks.
I received my order late Friday, and opened it Saturday. When sorting
out the parts, I found that the dox and parts list call out a MALE 25
pin D25 connector, while I was shipped a FEMALE connector. Has this
design been changed, or did they mispack my order - which is correct????
My guess is that they mispacked the order.
Thanks -
Kirby
1999\04\11@161201
by
Ben Wirz
Kirby,
You are correct that it should have been a Male DB25, we will send you a
replacment Monday. I appologize for the mistake.
Ben
Wirz Electronics
At 12:04 PM 4/11/99 -0400, Kirby Powell wrote:
{Quote hidden}>Hi all -
>
>I am newbie to the PIC world, after working with Z80 and 8080 years ago.
>After surfing the web, I decided on the Dontronics/Wirz programmer
>development system and SIMM Sticks.
>
>I received my order late Friday, and opened it Saturday. When sorting
>out the parts, I found that the dox and parts list call out a MALE 25
>pin D25 connector, while I was shipped a FEMALE connector. Has this
>design been changed, or did they mispack my order - which is correct????
>My guess is that they mispacked the order.
>
>Thanks -
>
>Kirby
>
Ben Wirz spamben
wirz.com
Wirz Electronics http://www.wirz.com/
SLI-OEM - The most cost effective Serial LCD available!
1999\04\11@164749
by
Les
There is a new Basic compiler at the Leading Edge Technologies site, Its not
fantastic but it is free!!!!!!!!!.
It can be found at
http://let.cambs.net/home.htm
Regards, Les.
1999\04\12@113709
by
Richard Martin
I sorry, but WHY was the above message sent to the entire
PicList Dist???
R.Martin
1999\04\12@173859
by
Nick Taylor
Richard Martin wrote:
>
> I sorry, but WHY was the above message sent to the entire
> PicList Dist???
>
> R.Martin
I sorry, but WHY was the above message sent to the entire
PicList Dist???
N.Taylor
1999\04\13@142834
by
WF AUTOMACAO
Les wrote:
>
> There is a new Basic compiler at the Leading Edge Technologies site, Its not
> fantastic but it is free!!!!!!!!!.
>
> It can be found at
>
> http://let.cambs.net/home.htm
>
> Regards, Les.
It's limited for PIC1654 and PIC1671 ;(
Why not for PIC16F84??? :)
Miguel
'I2C Hardware Master - 17 Series'
1999\05\28@072852
by
tmariner
|
I think we have tracked a problem to the Restart not functioning correctly
in the 17C752 using hardware I2C in Master mode. The Restart feature is used
to bring the SCL and SDA lines high from the low where the transmit of the
internal address left them so a start can begin the receive part of the I2C
transaction.
The Picmaster (in 17C756 mode) performs all of the necessary starts, stops,
etc. OK, but when RSEN is asserted high after the transmit, the SCL and SDA
remain low and the subsequent Start bit pulls the lines high rather than
asserting the start. The microchip EE's on the bus could care less if there
is an intervening Stop and work fine, but many other parts get upset when
the initial transmit ends with a stop. (One of the great things about the
Microchip EE's is that I swear one could throw a 100 base T signal at them
and they would figure out what to do!)
1. Has anyone else experienced this behaviour from the ICE or the chip?
2. Suggestions on "Don't do that's" or work arounds. (The 17 series won't
let one play with PortA so bit twiddling is out.)
Tom
'PIC '509A and '54B revision hardware bugs and osci'
1999\06\10@043912
by
William K. Borsum
Hello All:
History:
I've got a series of products running fine using 509 and 54-LP, and 54A-04
parts with 32KHz watch crystals. Oscillators start very quickly, and are
stable. Dropping in a 509A, or 54B revision part into the same place wi
th
the same code results in NO oscillation at all, and I have not been able to
find a combination of resistors or load capacitors that will cause/allow
oscillation.
Bad News:
This morning I was advised by a Microchip sales rep that the '54B was
defective--"had bugs" was the precise wording.
Question:
Have any of you seen this behavior, or anything like it? If so, do you
have a solution?
Thanks,
Kelly
****************************************************************************
********
All legitimate attachments to this email will be clearly identified in the
text.
William K. Borsum, P.E.
OEM Dataloggers and Instrumentation Systems
<borsumSTOPspam
dascor.com> & <http://www.dascor.com>
'how to invert hardware uart output in software?'
1999\06\26@145259
by
engelec
Hi to all engineers.
I am working with hardware uart 16c74a I need to invert the uart
output beside adding external inverter is there any way of doing it
in software ? any help will appreciated.
Andre
1999\06\27@050704
by
Russell McMahon
Probably not I'd say.
BUT
To do it in software probably costs very little.
single NPN small signal transistor, emitter to ground.
10k resistor from output pin to transistor base.
Resistor (size depends on drive required - 1k to 10K probably) from
collector to Vcc.
Output from collector.
Russell McMahon
-----Original Message-----
From: Andre Abelian <engelecSTOPspam
KILLspamearthlink.net>
To: @spam@PICLIST.....
spamMITVMA.MIT.EDU <spamPICLIST.....
.....MITVMA.MIT.EDU>
Date: Sunday, June 27, 1999 6:53 AM
Subject: how to invert hardware uart output in software?
>Hi to all engineers.
>
>I am working with hardware uart 16c74a I need to invert the uart
>output beside adding external inverter is there any way of doing it
>in software ? any help will appreciated.
>
>Andre
>
1999\06\27@135839
by
Chris Eddy
Russell;
The send function in a UART is actually somewhat simple. Assuming you
have interrupts, which is the real efficient way to do it, just bang
your message out. Then let the recieve run through the UART. The
recieve is the real work. You said you wanted to invert the send, not
recieve. If you want to do both, well, that is a different story.
Chris Eddy
Russell McMahon wrote:
{Quote hidden}> Probably not I'd say.
> BUT
> To do it in software probably costs very little.
> single NPN small signal transistor, emitter to ground.
> 10k resistor from output pin to transistor base.
> Resistor (size depends on drive required - 1k to 10K probably) from
> collector to Vcc.
> Output from collector.
>
> Russell McMahon
>
> {Original Message removed}
'how to invert hardware uart output in software?'
1999\07\03@174334
by
engelec
Russell ,
Thanks for your replay. at this point I inverted externally
using logic gate single transistor is good idea too.
andre
Russell McMahon wrote:
> Probably not I'd say.
> BUT
> To do it in software probably costs very little.
> single NPN small signal transistor, emitter to ground.
> 10k resistor from output pin to transistor base.
> Resistor (size depends on drive required - 1k to 10K probably) from
> collector to Vcc.
> Output from collector.
>
1999\07\03@192900
by
engelec
|
Chris,
thanks for your idea but couldn't understand clearly. what to do ?
Chris Eddy wrote:
> Russell;
>
> The send function in a UART is actually somewhat simple. Assuming you
> have interrupts,
sorry I do not use interrupt for uart
> which is the real efficient way to do it, just bang
> your message out.
that is from transmitter right ?
> Then let the recieve run through the UART.
is this means connecting transmit and receive together ?
> The
> recieve is the real work.
if the receiver takes the data back then how am I transmit ?
> You said you wanted to invert the send,
yes transmit only
{Quote hidden}> not
> recieve. If you want to do both, well, that is a different story.
>
> Chris Eddy
>
> Russell McMahon wrote:
>
> > Probably not I'd say.
> > BUT
> > To do it in software probably costs very little.
> > single NPN small signal transistor, emitter to ground.
> > 10k resistor from output pin to transistor base.
> > Resistor (size depends on drive required - 1k to 10K probably) from
> > collector to Vcc.
> > Output from collector.
> >
> > Russell McMahon
> >
> > {Original Message removed}
1999\07\04@070444
by
paulb
|
Andre Abelian wrote:
> thanks for your idea but couldn't understand clearly. What to do ?
He was suggesting you "bit-bang" the serial transmit function and use
the UART for receive. This on the (correct) premise that serial
transmission is much easier than receive.
> sorry I do not use interrupt for uart
If you use simple timing loops to clock out the transmitted bits, you
tend to occupy all the processor's time. If you have a source of
interrupts at the desired bitrate however, you can use these to clock
out the transmitted bits.
You can use timer interrupts to receive serial data, but then you need
interrupts at least three times the bitrate, and this is not so
efficient.
>> Then let the recieve run through the UART.
> is this means connecting transmit and receive together ?
No, just saying you use a general-purpose I/O to "bit-bang" the sent
data, but connect the received data to the UART as before (via an
inverter I presume).
It sounds like you went for the "hardware" solution anyway - just as
we as you really should isolate the PIC from the serial line.
--
Cheers,
Paul B.
1999\07\04@114202
by
Dave VanHorn
>
> You can use timer interrupts to receive serial data, but then you need
> interrupts at least three times the bitrate, and this is not so
> efficient.
I've done this on an 84, with ints AT the bitrate.
The trick is to catch the edge of the start bit, and sync the ints up half a
bit-time late.
I wouldn't use this approach in a noisy environment or on long lines.
1999\07\04@192359
by
paulb
Dave VanHorn wrote:
> I've done this on an 84, with ints AT the bitrate.
> The trick is to catch the edge of the start bit, and sync the ints up
> half a bit-time late.
Yes, but that's the hybrid technique; you still need to poll for the
start bit and synchronize the interrupts. Only *thereafter* it has low
overhead.
Fine if you are not using the timer for anything else - such as
timing!
> I wouldn't use this approach in a noisy environment or on long lines.
Muse: How many UARTs *actually* do take multiple samples and average
them, and how many just sample in the middle of each bit?
--
Cheers,
Paul B.
1999\07\04@193435
by
Dave VanHorn
> Yes, but that's the hybrid technique; you still need to poll for the
> start bit and synchronize the interrupts. Only *thereafter* it has low
> overhead.
nananana.. I put the serial in on an external int.
I used the timer for a bunch of functions.
1999\07\05@071801
by
paulb
Dave VanHorn wrote:
> nananana.. I put the serial in on an external int.
> I used the timer for a bunch of functions.
I think there is still a restriction insofar as you must synchronise
the timer to this serial interrupt on the start bit - you still cannot
use the timer for some other task.
Alternatively there is the technique of reading the timer each time
the serial line toggles and thus generates an interrupt (a lˆ BayCom).
That makes it both efficient and highly accurate (you can determine
*precisely* when the transition was and implement a PLL algorithm).
It takes a bit of design (i.e., thought) as for example, one interrupt
often shifts in as many as nine bits simultaneously, but is undoubtably
the best. I haven't actually implemented it myself yet, mind you.
--
Cheers,
Paul B.
1999\07\05@084317
by
wwl
On Mon, 5 Jul 1999 09:23:39 +1000, you wrote:
>Dave VanHorn wrote:
>
>> I've done this on an 84, with ints AT the bitrate.
>> The trick is to catch the edge of the start bit, and sync the ints up
>> half a bit-time late.
>
> Yes, but that's the hybrid technique; you still need to poll for the
>start bit and synchronize the interrupts. Only *thereafter* it has low
>overhead.
Not necessarily - you can either sample at 2x baud rate, or generate
an edge interrupt on the startbit.
1999\07\05@135320
by
Dave VanHorn
----- Original Message -----
From: Mike Harrison
> >Dave VanHorn wrote:
> >
> >> I've done this on an 84, with ints AT the bitrate.
> >> The trick is to catch the edge of the start bit, and sync the ints up
> >> half a bit-time late.
> >
> > Yes, but that's the hybrid technique; you still need to poll for the
> >start bit and synchronize the interrupts. Only *thereafter* it has low
> >overhead.
> Not necessarily - you can either sample at 2x baud rate, or generate
> an edge interrupt on the startbit.
That's what I said I did.. The second bit was someone else.
1999\07\05@150319
by
Wagner Lipnharski
This could be so simple if the manufactories just implement a
programmable "uart tx/rx data polarity bit"... in some cases it could be
important... but they think "what the hack? who in the world would need
it?", well I guess not even this question passed their heads... the
same for high/low speed internal programmable clock speed, when any
interrupt would automatically set high speed back from saving power...
but... again "who need it?" answer: WE DO! they would say "use sleep
mode, it works"... not at all, I want to keep the processor doing
something, while saving 90% of the power... not sleeping... but simple
things are impossible to be done by manufacturers.
Wagner.
'Software emulation of hardware indicators with Act'
1999\07\26@190639
by
Mark J Anstice
|
Hi everyone,
I'm after ideas for software emulation of real display hardware e.g. LED,
LCD, Alpha displays, dials, meters etc. What would you like to see modeled
in software for your or your company's projects? This is a great opportunity
for experimenters who would like to display real time information in a visual
form via ActiveX (you can use them in VB, VC++, Java or a web page or in
anything that supports ActiveX). All ideas would be greatly appreciated, and
of course testers will get the software for free.
This is a one man operation! I have purely aquired the skills to do this
kind of stuff alone, not some dodgy company add. A website offering these
ActiceX controls will be available in due course, in the mean time postings
will be made to this list as I know that many of you out there require what I
can produce.
PS Leo, If you are still out there please get in touch, I have the LCD
emulation that you required, ready for you take a look at (sorry it took so
long!!)
Thanks in advance,
Mark.
1999\07\26@191920
by
Peter van Hoof
For some really useful stuff in real time display's look at
http://www.instrument.com in their visual designer software (demo available)
they have some highly customizable display modules panel meters, bar graphs,
scope, chart and x-y plotters.
To bad they are in dll form and no info is available to make them work
outside their environment
I have made some pretty nifty compact disc tilt testers with these.
Peter
> {Original Message removed}
1999\07\28@195216
by
Mark J Anstice
the URL is not correct, please post the correct one. I have tried
http://www.instruments.com, It's rubbish. Come one, you're supposed to be
offering me help!!!!
1999\07\28@201947
by
Scott Dattalo
On Wed, 28 Jul 1999, Mark J Anstice wrote:
>
> the URL is not correct, please post the correct one. I have tried
> http://www.instruments.com, It's rubbish. Come one, you're supposed to be
> offering me help!!!!
>
Starting with this thread:
http://www.scruz.net/~cichlid/gnupic-archive/msg00136.html
we had a discussion on the gnupic mailing list about this subject. After
reviewing it, you may wish to join gnupic list and air your thoughts
there. Most of the people that'll have something constructive to offer on
this subject are for some strange reason no longer subscribed to the
piclist. Hmm, I wonder why?
There are also other threads where this subject was also discussed. I
think it's about time to revisit this issue though.
Scott
1999\07\28@230921
by
Peter van Hoof
Excuse me but I am helping you
You made a typo in the url , the correct url is http://www.instrument.com as
stated in my previous message
this is a slooooooooow site and doesn't seem to respond well tonight
If you want I can send you their demo software (couple meg's though)
Peter
{Quote hidden}> -----Original Message-----
> From: pic microcontroller discussion list
> [
PICLIST.....
MITVMA.MIT.EDU]On Behalf Of Mark J Anstice
> Sent: Wednesday, July 28, 1999 7:51 PM
> To:
KILLspamPICLISTspam_OUT
MITVMA.MIT.EDU
> Subject: Re: [OT] Software emulation of hardware indicators with ActiveX
>
>
> the URL is not correct, please post the correct one. I have tried
>
http://www.instruments.com, It's rubbish. Come one, you're supposed to be
> offering me help!!!!
1999\07\28@232010
by
Peter van Hoof
copy from the info on yahoo :
***********
Intelligent Instrumentation - manufactures PC data acquisition and data
collection products.
http://www.instrument.com/
***********
> {Original Message removed}
'Hardware Serial Ports'
1999\08\04@234413
by
Paul A Brown
|
I have some questions regarding the use of the hardware serial port on a
PIC16F876. All I want to do is initialize tbe serial port to 9600 baud,
asynchronous and spew out some data. I have looked at this code until my
eyes hurt, but to no avail. Could somebody point out where I am going
wrong? Does anyone have any sample transmit or receive code for the
hardware serial ports that they would like to share?
Thanks,
Paul Brown
; Registers
Cntr equ 0x20
;Initialize variables
clrf Cntr
;Initialize serial port
SerInit
bsf RCSTA, SPEN
bsf STATUS, RP0
bcf TXSTA, SYNC ;Asynchronous transmission
bsf TXSTA, BRGH ;Baud rate generator to high speed
movlw 129
movwf SPBRG ;Set BRG for 9600 buad.
bsf TXSTA, TXEN ;Enable transmit
bcf STATUS, RP0
;Main Program Loop
MainLoop
bsf STATUS, RP0
btfsc TXSTA, TRMT ;Check for data sent
goto TxData
goto MainLoop
;Increment Counter and Transmit
TxData
bcf STATUS, RP0
incf Cntr, 1
movf Cntr, 0
movwf TXREG
goto MainLoop
end
___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
1999\08\05@015748
by
kfinney
1. I assume that because you are using 129 for SPRG
& 9600 baud, that your clock speed is 20 MHz, right ?
2. The code should run as is, starting outputting
a null (0) follwed by the control codes, and other
printables. Perhaps you wanted to pre-load the
counter with the 0x20 (ASCII space) so you
can see printables appear in your terminal
at the other end ?
3. you didn't really say what wasn't working - if it couldn't
compile (with MPASM) then add
list p=16C876
#include p16C876.inc
at the top.
HTH
----------------------------------------------
Kenneth C. Finney
==============================================
Wilkes Associates, Inc.
Software Engineering - Embedded Systems
Design & Development - Project Management
==============================================
170 The Donway West Ste. 405, Toronto, Ontario
Office: (416) 445-9224 Mobile: (416) 453-6400
----------------------------------------------
> {Original Message removed}
1999\08\05@020202
by
kfinney
FWIW, I just popped your code into my Techtools ICE,
(running as a 16C76 instead of 876 'cos I don't
have that pod here with me), added the processor
directive and include at the top, and it runs fine.
Driving my ol' Atari 386 laptop nuts with chars
whippin' into it at 9600 bps ...:)
Ken
> I have some questions regarding the use of the hardware
> serial port on a
> PIC16F876. All I want to do is initialize tbe serial port
> to 9600 baud,
> asynchronous and spew out some data. I have looked at this
> code until my
> eyes hurt, but to no avail. Could somebody point out where
> I am going
> wrong? Does anyone have any sample transmit or receive code for the
> hardware serial ports that they would like to share?
>
[snip]
>
1999\08\05@024842
by
Giacomo Schieppati
|
hi Paul,
may be 'cause you are setting the BRGH bit. If you
read the microchip "mid range mcu" manual, page 18-22,
you see that there is a "silicon bug" :-)))))
--- Paul A Brown <spam_OUTpabrown2
TakeThisOuTJUNO.COM> scritto:
{Quote hidden}> I have some questions regarding the use of the
> hardware serial port on a
> PIC16F876. All I want to do is initialize tbe
> serial port to 9600 baud,
> asynchronous and spew out some data. I have looked
> at this code until my
> eyes hurt, but to no avail. Could somebody point
> out where I am going
> wrong? Does anyone have any sample transmit or
> receive code for the
> hardware serial ports that they would like to share?
>
> Thanks,
>
> Paul Brown
>
>
> ; Registers
> Cntr equ 0x20
>
>
> ;Initialize variables
> clrf Cntr
>
>
> ;Initialize serial port
> SerInit
> bsf RCSTA, SPEN
> bsf STATUS, RP0
> bcf TXSTA, SYNC ;Asynchronous
> transmission
> bsf TXSTA, BRGH ;Baud rate generator to
> high speed
> movlw 129
> movwf SPBRG ;Set BRG for 9600 buad.
> bsf TXSTA, TXEN ;Enable transmit
> bcf STATUS, RP0
>
> ;Main Program Loop
> MainLoop
> bsf STATUS, RP0
> btfsc TXSTA, TRMT ;Check for data sent
> goto TxData
> goto MainLoop
>
>
> ;Increment Counter and Transmit
> TxData
> bcf STATUS, RP0
> incf Cntr, 1
> movf Cntr, 0
> movwf TXREG
> goto MainLoop
>
> end
>
>
___________________________________________________________________
> Get the Internet just the way you want it.
> Free software, free e-mail, and free Internet access
> for a month!
> Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
>
===
Giacomo Schieppati,
e-mail: .....gschieppati.....
RemoveMEyahoo.it
e-mail URGENTI: spam_OUTgschieppatiTakeThisOuT
EraseMEi.am
e-mail alcooliche: EraseMEgiacspamBeGone
KILLspambeer.com
ICQ: 34514036
______________________________________________________________________
DO YOU YAHOO!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
1999\08\05@044818
by
root
Hello,
how is it with Watchdog Enabled, and the TRISC register?
Imre
1999\08\05@055155
by
Laszlo Kohegyi
Giacomo Schieppati <RemoveMEgschieppatispamBeGone
spamYAHOO.IT> d‡tum: 1999.08.05 08:48:22
>hi Paul,
>
>may be 'cause you are setting the BRGH bit. If you
>read the microchip "mid range mcu" manual, page 18-22,
>you see that there is a "silicon bug" :-)))))
Hi Giacomo,
Could you be more specific? I tried to look it up but haven't found
anything.
Regards
Les
1999\08\05@072056
by
Giacomo Schieppati
1999\08\05@220130
by
Kelly J. Kohls
1999\08\05@235357
by
Paul A Brown
Thanks for replying. I had some trouble with my email for the last 24
hrs. I may have missed someone else's ideas. If you have sent
something, please resend it to me personally.
I do not think the problem is with the BRGH bit. At least the 16C7X
manual says it is fixed for 16F87X's... The issue with the BRGH bit (as
I heard it) was erratic data transmission/reception. My problem is that
I don't have anything at all.
I looked at AN574 and made a few changes to the code. AN574 was written
for a 17C43. I tried to follow the gist of it, but with no luck.
Paul
On Thu, 5 Aug 1999 20:57:04 -0500 "Kelly J. Kohls" <spamBeGonekkohls
RemoveMEJUNO.COM>
writes:
{Quote hidden}
___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
'PIC16C63 I2C Slave hardware'
1999\08\09@023002
by
Steve Schwartz
Hi all,
I have recently joined the list, but have been designing with PICs for
several years.
I am now committed to a project needing to use I2C in slave mode on a 16C63.
I have searched the archives, and seen a lot of people describing all the
various problems they have had getting the SSP to work in I2C SLAVE mode,
but nothing conclusive.
My question:
Has ANYBODY actually written working code to implement I2C slave,
transmitter and receiver for 16C63 (or other midrange PIC)?
All replies will be met with gratitude.
Thanks,
Steve Schwartz
2Wire Systems
1999\08\09@131224
by
Roger L Stevens
|
Bit-bang I2C implementations are included in Square One's latest book:
"Serial PIC'n". See http://www.sq-1.com. In Chapter 8, Sections 8.3 and 8.6
you will find routines to implement I2C slave communications and
applications. Code modules are included and may be used in your
application.
On Sun, 8 Aug 1999 23:19:09 -0700 Steve Schwartz <spamBeGonesesspamBeGone
@spam@HOME.COM> writes:
{Quote hidden}>Hi all,
>
>I have recently joined the list, but have been designing with PICs for
>several years.
>
>I am now committed to a project needing to use I2C in slave mode on a
>16C63.
>I have searched the archives, and seen a lot of people describing all
>the
>various problems they have had getting the SSP to work in I2C SLAVE
>mode,
>but nothing conclusive.
>
>My question:
>
>Has ANYBODY actually written working code to implement I2C slave,
>transmitter and receiver for 16C63 (or other midrange PIC)?
>
>All replies will be met with gratitude.
>
>Thanks,
>
>Steve Schwartz
>2Wire Systems
___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.
1999\08\09@133100
by
Steve Schwartz
I guess I should have been even more careful:
Has ANYBODY actually written working code to implement I2C slave,
transmitter and receiver for 16C63 (or other midrange PIC), USING THE SSP
ON-BOARD HARDWARE?
Bit-banging an I2C slave reduces the available computing power to VERY low
levels, almost useless for anything else. In any case, interrupt driven,
hardware (SSP) based routines, which take the known bugs into account are
what I'm looking for. Specifically, the PIC SSP has a tendency to be buggy
when used as a slave transmitter. It can lock the bus under some
conditions! I am hoping to find someone who has experienced this
first-hand, and found a work-around.
Thanks for taking the time to reply, and sorry I didn't clarify enough.
Best,
Steve
> {Original Message removed}
1999\08\09@143248
by
rgoodrich
|
I have seen it done with a 16C77 as the master and five 16c72s as slaves, the
SSP hardware was used in the slaves only. Unfortunately the code is not
available, but I know there were no major issues during development.
Sorry I can not be of further help.
Ray
Steve Schwartz wrote:
{Quote hidden}>
> I guess I should have been even more careful:
>
> Has ANYBODY actually written working code to implement I2C slave,
> transmitter and receiver for 16C63 (or other midrange PIC), USING THE SSP
> ON-BOARD HARDWARE?
>
> Bit-banging an I2C slave reduces the available computing power to VERY low
> levels, almost useless for anything else. In any case, interrupt driven,
> hardware (SSP) based routines, which take the known bugs into account are
> what I'm looking for. Specifically, the PIC SSP has a tendency to be buggy
> when used as a slave transmitter. It can lock the bus under some
> conditions! I am hoping to find someone who has experienced this
> first-hand, and found a work-around.
>
> Thanks for taking the time to reply, and sorry I didn't clarify enough.
>
> Best,
> Steve
>
> > {Original Message removed}
'hardware PWM output pin'
1999\08\16@115932
by
Andre Abelian
Hi to all engineers.
I was wondering if possible to change hardware PWM output pin.
In my project I need 4 outputs to turn each one on at different
duty cycle ( software PWM works ) but hardware PWM seams like
I am stock on one pin any idea ?
Andre
1999\08\17@003903
by
Mark Willis
|
Bit-banging it is the way I'd go, then. Probably run 4 state machines
in one (something like this quick hack of a piece of protocode): Here,
PWM1 is to be on 10 of 12 cycles, PWM2 12 of 40, etc. (Yeah, it's not
optimized or anything, and it's untested. So flame me <G>) One obvious
optimization: At runtime, if ratio can have common factors thrown out,
do so (i.e. case # 1 here would become 5 of 6, # 2 would become 3 of 10,
# 3 1 of 4, and # 4 stay the same.)
Bool PWM1State = False, PWM2State = False;
Bool PWM3State = False, PWM4State = False;
Int PWM1On = 10, PWM1Cycles = 12, PWM1Counter = 0;
Int PWM2On = 12, PWM2Cycles = 40, PWM2Counter = 0;
Int PWM3On = 15, PWM3Cycles = 60, PWM3Counter = 0;
Int PWM4On = 13, PWM4Cycles = 20, PWM4Counter = 0;
While (True) do
{
PWM1State = (PWM1Counter < PWM1On);
PWM2State = (PWM2Counter < PWM2On);
PWM3State = (PWM3Counter < PWM3On);
PWM4State = (PWM4Counter < PWM4On);
SetPWMPins (PWM1State, PWM2State, PWM3State, PWM4State);
PWM1Counter++; If (PWM1Counter >= PWM1Cycles) PWM1Counter = 0;
PWM2Counter++; If (PWM2Counter >= PWM2Cycles) PWM2Counter = 0;
PWM3Counter++; If (PWM3Counter >= PWM3Cycles) PWM3Counter = 0;
PWM4Counter++; If (PWM4Counter >= PWM4Cycles) PWM4Counter = 0;
}
Mark
Andre Abelian wrote:
>
> Hi to all engineers.
>
> I was wondering if possible to change hardware PWM output pin.
> In my project I need 4 outputs to turn each one on at different
> duty cycle ( software PWM works ) but hardware PWM seams like
> I am stock on one pin any idea ?
>
> Andre
1999\08\17@115550
by
Andre Abelian
|
Sorry Mark I am not good at C can you convert it to assembly.
Andre
{Quote hidden}> Bit-banging it is the way I'd go, then. Probably run 4 state machines
> in one (something like this quick hack of a piece of protocode): Here,
> PWM1 is to be on 10 of 12 cycles, PWM2 12 of 40, etc. (Yeah, it's not
> optimized or anything, and it's untested. So flame me <G>) One obvious
> optimization: At runtime, if ratio can have common factors thrown out,
> do so (i.e. case # 1 here would become 5 of 6, # 2 would become 3 of 10,
> # 3 1 of 4, and # 4 stay the same.)
>
> Bool PWM1State = False, PWM2State = False;
> Bool PWM3State = False, PWM4State = False;
> Int PWM1On = 10, PWM1Cycles = 12, PWM1Counter = 0;
> Int PWM2On = 12, PWM2Cycles = 40, PWM2Counter = 0;
> Int PWM3On = 15, PWM3Cycles = 60, PWM3Counter = 0;
> Int PWM4On = 13, PWM4Cycles = 20, PWM4Counter = 0;
>
> While (True) do
> {
> PWM1State = (PWM1Counter < PWM1On);
> PWM2State = (PWM2Counter < PWM2On);
> PWM3State = (PWM3Counter < PWM3On);
> PWM4State = (PWM4Counter < PWM4On);
> SetPWMPins (PWM1State, PWM2State, PWM3State, PWM4State);
> PWM1Counter++; If (PWM1Counter >= PWM1Cycles) PWM1Counter = 0;
> PWM2Counter++; If (PWM2Counter >= PWM2Cycles) PWM2Counter = 0;
> PWM3Counter++; If (PWM3Counter >= PWM3Cycles) PWM3Counter = 0;
> PWM4Counter++; If (PWM4Counter >= PWM4Cycles) PWM4Counter = 0;
> }
>
> Mark
>
> Andre Abelian wrote:
> >
> > Hi to all engineers.
> >
> > I was wondering if possible to change hardware PWM output pin.
> > In my project I need 4 outputs to turn each one on at different
> > duty cycle ( software PWM works ) but hardware PWM seams like
> > I am stock on one pin any idea ?
> >
> > Andre
>
1999\08\17@131155
by
Scott Dattalo
|
On Tue, 17 Aug 1999, Andre Abelian wrote:
> Date: Tue, 17 Aug 1999 09:00:50 -0700
> From: Andre Abelian <RemoveMEengelecRemoveME
RemoveMEearthlink.net>
> To: PICLISTKILLspam
spamMITVMA.MIT.EDU
> Subject: Re: hardware PWM output pin
>
> Sorry Mark I am not good at C can you convert it to assembly.
Here's a routine I posted about a year or so ago that implements in
assembly mostly of what Mark writes in C. The only difference is that
these multiple pwms are synchronized. That is, they all turn on at the
same time but turn off at the time defined by the pwm pulse width. If you
need variable frequencies, I wrote one of those too using vertical
counters.
The way you'd go about using this routine is by:
1) define the pulse width of the 8 (or fewer ) pwms and store this info in
the pwm0-pwm7 file registers. You may wish to shadow these values since
the pwm_multiple routine will modify the registers.
2) Isochronously call pwm_multiple. It'd probably be easiest to just
create a timer interrupt and to call the routine from the handler (or
place it in line).
;------------------------------------------------------------
;pwm_multiple
;
; The purpose of this routine is to generate 8 pulse width
;modulated waveforms. The algorithm consists of 9 counters
;that change the state of the pwm bits whenever they roll over.
;One of the counters, rising_edge, will drive the pwm bits
;high when it rolls over. The other 8 counters pwm0-pwm7 will
;drive their corresponding bits low when they roll over.
;
;
;RAM:
; pwm0-pwm7 - pwm counters
; rising_edge - rising edge counter
; pwm_state - current state of the pwm outputs.
;ROM
; 23 instructions
;Execution time
; 23 cycles
pwm_multiple
CLRW ;Build the bit mask for turning
;off the PWM outputs. Assume that
;all of the outputs will be turned
;off.
;
DECFSZ pwm0,F ;If the first counter has not reached 0
IORLW 00000001b ;then we don't want to turn it off.
;
DECFSZ pwm1,F ;Same for the second one
IORLW 00000010b ;
;
DECFSZ pwm2,F ;and so on...
IORLW 00000100b ;
;
DECFSZ pwm3,F ;
IORLW 00001000b ;
;
DECFSZ pwm4,F ;
IORLW 00010000b ;
;
DECFSZ pwm5,F ;
IORLW 00100000b ;
;
DECFSZ pwm6,F ;
IORLW 01000000b ;
;
DECFSZ pwm7,F ;
IORLW 10000000b ;
;
;
ANDWF pwm_state,W ; Clear all of those pwm outputs
;that have reached zero.
;
XORLW 11111111b ;Toggle the current state.
INCFSZ rising_edge,F ;If the rising edge counter has not
XORLW 11111111b ;rolled over then toggle them again.
;Double toggle == no effect. However,
;if the rising edge counter does roll
;over then a single toggle will turn
;the pwm bits on, unless of course the
;pwm counter has just rolled over too.
;
MOVWF pwm_state ;Save the state
MOVWF PWM_PORT ;update the outputs
you may want to update the pwmx counters when the rising edge counter
rolls over. So you could do something like:
movf rising_edge,w
skpz
return
movf pwm0_shadow,w
movwf pwm0
.
.
.
Scott
{Quote hidden}>
> Andre
>
>
>
>
> > Bit-banging it is the way I'd go, then. Probably run 4 state machines
> > in one (something like this quick hack of a piece of protocode): Here,
> > PWM1 is to be on 10 of 12 cycles, PWM2 12 of 40, etc. (Yeah, it's not
> > optimized or anything, and it's untested. So flame me <G>) One obvious
> > optimization: At runtime, if ratio can have common factors thrown out,
> > do so (i.e. case # 1 here would become 5 of 6, # 2 would become 3 of 10,
> > # 3 1 of 4, and # 4 stay the same.)
> >
> > Bool PWM1State = False, PWM2State = False;
> > Bool PWM3State = False, PWM4State = False;
> > Int PWM1On = 10, PWM1Cycles = 12, PWM1Counter = 0;
> > Int PWM2On = 12, PWM2Cycles = 40, PWM2Counter = 0;
> > Int PWM3On = 15, PWM3Cycles = 60, PWM3Counter = 0;
> > Int PWM4On = 13, PWM4Cycles = 20, PWM4Counter = 0;
> >
> > While (True) do
> > {
> > PWM1State = (PWM1Counter < PWM1On);
> > PWM2State = (PWM2Counter < PWM2On);
> > PWM3State = (PWM3Counter < PWM3On);
> > PWM4State = (PWM4Counter < PWM4On);
> > SetPWMPins (PWM1State, PWM2State, PWM3State, PWM4State);
> > PWM1Counter++; If (PWM1Counter >= PWM1Cycles) PWM1Counter = 0;
> > PWM2Counter++; If (PWM2Counter >= PWM2Cycles) PWM2Counter = 0;
> > PWM3Counter++; If (PWM3Counter >= PWM3Cycles) PWM3Counter = 0;
> > PWM4Counter++; If (PWM4Counter >= PWM4Cycles) PWM4Counter = 0;
> > }
> >
> > Mark
> >
> > Andre Abelian wrote:
> > >
> > > Hi to all engineers.
> > >
> > > I was wondering if possible to change hardware PWM output pin.
> > > In my project I need 4 outputs to turn each one on at different
> > > duty cycle ( software PWM works ) but hardware PWM seams like
> > > I am stock on one pin any idea ?
> > >
> > > Andre
> >
>
1999\08\17@191923
by
Mark Willis
|
Scott Dattalo wrote:
> On Tue, 17 Aug 1999, Andre Abelian wrote:
>
> > Date: Tue, 17 Aug 1999 09:00:50 -0700
> > From: Andre Abelian <spam_OUTengelec@spam@
earthlink.net>
> > To: TakeThisOuTPICLISTspam_OUT
MITVMA.MIT.EDU
> > Subject: Re: hardware PWM output pin
> >
> > Sorry Mark I am not good at C can you convert it to assembly.
>
> Here's a routine I posted about a year or so ago that implements in
> assembly mostly of what Mark writes in C. The only difference is that
> these multiple pwms are synchronized. That is, they all turn on at the
> same time but turn off at the time defined by the pwm pulse width. If you
Quite do-able in my QuickHack code, just set the PWM{i}Cycles numbers
all to the same in my routine <G> Probably a better way to do it in
Assembly, here, and you save 3 Int's worth of storage - I did say it
wasn't optimized <G>. I'll also add that it's sometimes good to use a
comparison on PWM'ing, to a variable (like my PWM1On) instead of to a
constant (for example: if you're trying to PWM 3.3VDC from 5VDC off a
PIC pin, you want to do feedback, watching the actual voltage, not the
theoretical voltage!) (Make sure your algorithm does what you need it
to do, not just what "theoretically is right", for you beginners <G>)
10 second C lesson, here: (Not that this was really C, more quick &
dirty C-Like Pseudocode <G>)
Bool PWM1State = False; means PWM1State is a variable, initialized to
0, with 2 states (1 for true, 0 for false.) Though in C, nonzero
usually is used to mean True.
Int PWM1On = 10; means Integer variable (could be 8-bit or 16-bit, in
assembler I'd use 8-bit probably) initialized to 10.
While (True) do { } means do the same things repeatedly forever (could
be Label: [Stuff in { }] followed by Goto Label, in assembler.
PWM1State = (PWM1Counter < PWM1On) means that if PWM1Counter < PWM1On,
set PWM1State to True, else False (use ClrW then IORLW like Scott
Dattalo did, same thing.)
SetPWMPins (PWM1State, PWM2State, PWM3State, PWM4State) is a function
call - I imply MovWF PWM_Port there.
PWM1Counter++ means increment PWM1Counter.
If (PWM1Counter >= PWM1Cycles) PWM1Counter = 0 is sort of obvious <G>
Mark
'[OT] Software emulation of hardware indicators wit'
1999\09\03@173517
by
Harrison Cooper
'PIC16F876 Hardware bug and who do I tell?'
1999\11\03@163006
by
Erik Reikes
|
I believe I've just found a really nasty hardware bug in the 16F876. I
figure I would tell you guys first then figure out who at MChip to give a
piece of my mind.
Here's the scenario : I'm using pin 0 of port A to wakeup an external
device. This involves toggling the pin. If only pin 0 is written to, a 0
never comes out on the port. To get it to write something another pin on
port A must also be written to.
My bare bones software test cases are :
1: xor pin 0 with 1
2: delay
In this case pin 0 stays a 1, constantly. If I change it to :
1: xor pin 0 with 1
2: delay
3: write a 1 to pin 1,2,3 or 5;
4: write a 0 to pin 1,2,3, or 5;
Then it works. Otherwise nix. It operates in exactly the same manner with
bsf and bcf on that particular pin. I didn't see anything in the errata on
this. I'm more than a bit irritated. If someone can show me how this is a
bug on my part I'd be grateful (as well as surprised).
Here's the source for working :
m015 MOVLW .1
00F0 1283 0529 BCF 0x03,RP0
00F1 1303 0530 BCF 0x03,RP1
00F2 0685 0531 XORWF PORTA,1
00F3 0000 0533 NOP
00F4 0000 0535 NOP
00F5 0000 0537 NOP
00F6 0000 0539 NOP
00F7 0000 0541 NOP
00F8 1685 0544 BSF PORTA,5
00F9 1285 0546 BCF PORTA,5
00FA 28EF 0549 GOTO m015
And for not working :
m015 MOVLW .1
00F0 1283 0529 BCF 0x03,RP0
00F1 1303 0530 BCF 0x03,RP1
00F2 0685 0531 XORWF PORTA,1
00F3 0000 0533 NOP
00F4 0000 0535 NOP
00F5 0000 0537 NOP
00F6 0000 0539 NOP
00F7 0000 0541 NOP
00F8 28EF 0547 GOTO m015
1999\11\03@171353
by
Tony Nixon
Erik Reikes wrote:
>
> My bare bones software test cases are :
> 1: xor pin 0 with 1
> 2: delay
> In this case pin 0 stays a 1, constantly. If I change it to :
Maybe if it is connected to an external circuit, the input latch only
ever sees a logic low level, so each time it is xor'd you keep setting
it to a logic 1.
Eg. movf porta,w ; = xxxxxxx0 <- always reads as 0
xorlw 1h ; = xxxxxxx1
movwf porta ; = xxxxxxx1
bsf directly changes the port pin as does writing a fixed value, which
as you mention works.
--
Best regards
Tony
http://www.picnpoke.com
Email KILLspamsales.....
TakeThisOuTpicnpoke.com
1999\11\03@173033
by
Erik Reikes
At 09:10 AM 11/4/99 +1100, you wrote:
>Erik Reikes wrote:
>>
>
>> My bare bones software test cases are :
>> 1: xor pin 0 with 1
>> 2: delay
>> In this case pin 0 stays a 1, constantly. If I change it to :
>
>Maybe if it is connected to an external circuit, the input latch only
>ever sees a logic low level, so each time it is xor'd you keep setting
>it to a logic 1.
>
>Eg. movf porta,w ; = xxxxxxx0 <- always reads as 0
> xorlw 1h ; = xxxxxxx1
> movwf porta ; = xxxxxxx1
>
>bsf directly changes the port pin as does writing a fixed value, which
>as you mention works.
writing fixed values and bsf do not work unless other pins in the circuit
are also set and switched. I'm also looking at the pin with a scope and
seeing a high voltage on the sucker.
-E
>
>--
>Best regards
>
>Tony
>
>http://www.picnpoke.com
>Email TakeThisOuTsalesEraseME
RemoveMEpicnpoke.com
1999\11\03@174030
by
Dennis Plunkett
|
At 13:32 3/11/99 -0800, you wrote:
{Quote hidden}>I believe I've just found a really nasty hardware bug in the 16F876. I
>figure I would tell you guys first then figure out who at MChip to give a
>piece of my mind.
>
>Here's the scenario : I'm using pin 0 of port A to wakeup an external
>device. This involves toggling the pin. If only pin 0 is written to, a 0
>never comes out on the port. To get it to write something another pin on
>port A must also be written to.
>
>My bare bones software test cases are :
>1: xor pin 0 with 1
>2: delay
>
>In this case pin 0 stays a 1, constantly. If I change it to :
>
>1: xor pin 0 with 1
>2: delay
>3: write a 1 to pin 1,2,3 or 5;
>4: write a 0 to pin 1,2,3, or 5;
>
>Then it works. Otherwise nix. It operates in exactly the same manner with
>bsf and bcf on that particular pin. I didn't see anything in the errata on
>this. I'm more than a bit irritated. If someone can show me how this is a
>bug on my part I'd be grateful (as well as surprised).
>
>Here's the source for working :
>
>m015 MOVLW .1
>00F0 1283 0529 BCF 0x03,RP0
>00F1 1303 0530 BCF 0x03,RP1
>00F2 0685 0531 XORWF PORTA,1
>00F3 0000 0533 NOP
>00F4 0000 0535 NOP
>00F5 0000 0537 NOP
>00F6 0000 0539 NOP
>00F7 0000 0541 NOP
>00F8 1685 0544 BSF PORTA,5
>00F9 1285 0546 BCF PORTA,5
>00FA 28EF 0549 GOTO m015
>
>And for not working :
>m015 MOVLW .1
>00F0 1283 0529 BCF 0x03,RP0
>00F1 1303 0530 BCF 0x03,RP1
>00F2 0685 0531 XORWF PORTA,1
>00F3 0000 0533 NOP
>00F4 0000 0535 NOP
>00F5 0000 0537 NOP
>00F6 0000 0539 NOP
>00F7 0000 0541 NOP
>00F8 28EF 0547 GOTO m015
>
>
Is this not a read write modify type instruction?
Where to XORWF with portA it must read PORTA, in this case it is an output
so portA has an "undefined" input value on 0.
Dennis
1999\11\03@181621
by
Tony Nixon
Erik Reikes wrote:
> writing fixed values and bsf do not work unless other pins in the circuit
> are also set and switched. I'm also looking at the pin with a scope and
> seeing a high voltage on the sucker.
Have you tried isolating porta and just use a LED to test? Maybe your
circuit is causing the problem. I just checked the data sheet for F8XX
series and the input circuits on port A and B work with TTL levels (?).
--
Best regards
Tony
http://www.picnpoke.com
Email spam_OUTsalesRemoveME
.....picnpoke.com
1999\11\03@183452
by
Erik Reikes
At 10:14 AM 11/4/99 +1100, you wrote:
>Erik Reikes wrote:
>
>> writing fixed values and bsf do not work unless other pins in the circuit
>> are also set and switched. I'm also looking at the pin with a scope and
>> seeing a high voltage on the sucker.
>
>Have you tried isolating porta and just use a LED to test? Maybe your
>circuit is causing the problem. I just checked the data sheet for F8XX
>series and the input circuits on port A and B work with TTL levels (?).
>
I have it completely out of circuit except for the osc etc. Its sitting on
a protoboard. I have disabled the AD's, and setup all of port a as
outputs. They don't work according to the manual. That is a bug.
All manner of code that I had working fine on port b chokes on individual
pins on port A. These are all things that worked on portb pins with
identical block diagrams to similar pins on port A.
-ErikR
1999\11\03@184706
by
roberto1
|
I know its basic, but have your CORRECTLY set the ADCON register? Last
month I was developing code for '877 and I reached your same problem. It
was solved changing the ADCON register.
Another thing: When you execute an toggle routine or command, the pic
reads the pin contents, then togle a bit and shifts out it again to the
pin, so, depending on your hardware (an led drawing a lot of current for
example), when the pic reads the pin, the "hi" (an 1) voltage on it is
below, let's say 2.5v; so the read is interpreted as a low rather then a
high. If it happens, the real behavior is that the pin don't toggle. It
also happened to me last month.
If it helps, reply so I may track this "interesting" behavior.
see you,
Beto.
______________
I believe I've just found a really nasty hardware bug in the 16F876. I
figure I would tell you guys first then figure out who at MChip to give
a
piece of my mind.
Here's the scenario : I'm using pin 0 of port A to wakeup an external
device. This involves toggling the pin. If only pin 0 is written to, a
0
never comes out on the port. To get it to write something another pin
on
port A must also be written to.
My bare bones software test cases are :
1: xor pin 0 with 1
2: delay
In this case pin 0 stays a 1, constantly. If I change it to :
1: xor pin 0 with 1
2: delay
3: write a 1 to pin 1,2,3 or 5;
4: write a 0 to pin 1,2,3, or 5;
Then it works. Otherwise nix. It operates in exactly the same manner
with
bsf and bcf on that particular pin. I didn't see anything in the errata
on
this. I'm more than a bit irritated. If someone can show me how this
is a
bug on my part I'd be grateful (as well as surprised).
Here's the source for working :
m015 MOVLW .1
00F0 1283 0529 BCF 0x03,RP0
00F1 1303 0530 BCF 0x03,RP1
00F2 0685 0531 XORWF PORTA,1
00F3 0000 0533 NOP
00F4 0000 0535 NOP
00F5 0000 0537 NOP
00F6 0000 0539 NOP
00F7 0000 0541 NOP
00F8 1685 0544 BSF PORTA,5
00F9 1285 0546 BCF PORTA,5
00FA 28EF 0549 GOTO m015
And for not working :
m015 MOVLW .1
00F0 1283 0529 BCF 0x03,RP0
00F1 1303 0530 BCF 0x03,RP1
00F2 0685 0531 XORWF PORTA,1
00F3 0000 0533 NOP
00F4 0000 0535 NOP
00F5 0000 0537 NOP
00F6 0000 0539 NOP
00F7 0000 0541 NOP
00F8 28EF 0547 GOTO m015
_________________________________________________________________________
MailBR - O e-mail do Brasil -- http://www.mailbr.com.br
Estamos concorrendo ao IBEST - Servigos On-Line
Acesse http://ibest.mailbr.com.br e Vote!
1999\11\03@184719
by
Tony Nixon
Erik Reikes wrote:
> All manner of code that I had working fine on port b chokes on individual
> pins on port A. These are all things that worked on portb pins with
> identical block diagrams to similar pins on port A.
Possibly a dud chip also - wierder things have happened.
Do you have another chip to try out? I have an ES sample I could try,
but not handy until I go home.
--
Best regards
Tony
http://www.picnpoke.com
Email spamsalesKILLspam
KILLspampicnpoke.com
1999\11\03@191852
by
Erik Reikes
|
At 09:43 PM 11/3/99 -0200, spamroberto1spam_OUT
MAILBR.COM.BR wrote:
>I know its basic, but have your CORRECTLY set the ADCON register? Last
>month I was developing code for '877 and I reached your same problem. It
>was solved changing the ADCON register.
ADCON1 = 0x0F;
which by my read sets the pins as not AD.
I also ran into this at first, but that was weeks and weeks ago.
This is the first thing I checked. Good suggestion though.
>
>Another thing: When you execute an toggle routine or command, the pic
>reads the pin contents, then togle a bit and shifts out it again to the
>pin, so, depending on your hardware (an led drawing a lot of current for
>example), when the pic reads the pin, the "hi" (an 1) voltage on it is
>below, let's say 2.5v; so the read is interpreted as a low rather then a
>high. If it happens, the real behavior is that the pin don't toggle. It
>also happened to me last month.
>
It is definitely not this, as I pulled it completely out of the circuit.
I'm beginning to suspect that perhaps my programmer is bad.
It has been getting flaky verifies lately. I have 4 chips on carriers so I
don't think it is bum chips.
I will be investigating further, and let you know how it comes out.
Thanks for the suggestions.
-Erik Reikes
{Quote hidden}>If it helps, reply so I may track this "interesting" behavior.
>
>see you,
> Beto.
>
>
>
>
>______________
>I believe I've just found a really nasty hardware bug in the 16F876. I
>figure I would tell you guys first then figure out who at MChip to give
>a
>piece of my mind.
>
>Here's the scenario : I'm using pin 0 of port A to wakeup an external
>device. This involves toggling the pin. If only pin 0 is written to, a
>0
>never comes out on the port. To get it to write something another pin
>on
>port A must also be written to.
>
>My bare bones software test cases are :
>1: xor pin 0 with 1
>2: delay
>
>In this case pin 0 stays a 1, constantly. If I change it to :
>
>1: xor pin 0 with 1
>2: delay
>3: write a 1 to pin 1,2,3 or 5;
>4: write a 0 to pin 1,2,3, or 5;
>
>Then it works. Otherwise nix. It operates in exactly the same manner
>with
>bsf and bcf on that particular pin. I didn't see anything in the errata
>on
>this. I'm more than a bit irritated. If someone can show me how this
>is a
>bug on my part I'd be grateful (as well as surprised).
>
>Here's the source for working :
>
>m015 MOVLW .1
>00F0 1283 0529 BCF 0x03,RP0
>00F1 1303 0530 BCF 0x03,RP1
>00F2 0685 0531 XORWF PORTA,1
>00F3 0000 0533 NOP
>00F4 0000 0535 NOP
>00F5 0000 0537 NOP
>00F6 0000 0539 NOP
>00F7 0000 0541 NOP
>00F8 1685 0544 BSF PORTA,5
>00F9 1285 0546 BCF PORTA,5
>00FA 28EF 0549 GOTO m015
>
>And for not working :
>m015 MOVLW .1
>00F0 1283 0529 BCF 0x03,RP0
>00F1 1303 0530 BCF 0x03,RP1
>00F2 0685 0531 XORWF PORTA,1
>00F3 0000 0533 NOP
>00F4 0000 0535 NOP
>00F5 0000 0537 NOP
>00F6 0000 0539 NOP
>00F7 0000 0541 NOP
>00F8 28EF 0547 GOTO m015
>
>_________________________________________________________________________
>MailBR - O e-mail do Brasil --
http://www.mailbr.com.br
>Estamos concorrendo ao IBEST - Servigos On-Line
>Acesse
http://ibest.mailbr.com.br e Vote!
'PIC16F876 Hardware bug and who do I tell? RTFM'
1999\11\03@200659
by
Erik Reikes
|
At 09:43 PM 11/3/99 -0200, STOPspamroberto1spam_OUT
spamBeGoneMAILBR.COM.BR wrote:
>I know its basic, but have your CORRECTLY set the ADCON register? Last
>month I was developing code for '877 and I reached your same problem. It
>was solved changing the ADCON register.
>
And how dumb am I?
I looked at the adcon1 and didn't properly read the mapping. I shouldn't
have discarded your suggestion of checking adcon1 so quickly. After some
thought (cursing and yelling... ;) )I went back to it and sure enough I had
left that pin in AD mode. Its a wonder I got anything out of it.
So I had it set up as an output, AD channel, and I was writing to it. What
I was getting out were sporadic blips depending on what else I did with the
port as a whole.
Mea culpa, mea culpa. I be dumb.
Thanks for all of the suggestions from everyone. I have changed the
subject line appropriately to RTFM... We all know what that means.
-Erik Reikes
'PIC16F876 Who says hardware bug?'
1999\11\03@201112
by
Dennis Plunkett
|
At 16:22 3/11/99 -0800, you wrote:
{Quote hidden}>At 09:43 PM 11/3/99 -0200,
spam_OUTroberto1
spamBeGoneMAILBR.COM.BR wrote:
>>I know its basic, but have your CORRECTLY set the ADCON register? Last
>>month I was developing code for '877 and I reached your same problem. It
>>was solved changing the ADCON register.
>
>ADCON1 = 0x0F;
>
>which by my read sets the pins as not AD.
>
>I also ran into this at first, but that was weeks and weeks ago.
>This is the first thing I checked. Good suggestion though.
>
>>
>>Another thing: When you execute an toggle routine or command, the pic
>>reads the pin contents, then togle a bit and shifts out it again to the
>>pin, so, depending on your hardware (an led drawing a lot of current for
>>example), when the pic reads the pin, the "hi" (an 1) voltage on it is
>>below, let's say 2.5v; so the read is interpreted as a low rather then a
>>high. If it happens, the real behavior is that the pin don't toggle. It
>>also happened to me last month.
>>
>
>It is definitely not this, as I pulled it completely out of the circuit.
Oh,
Definintily is!
Pulling it out of circuit only exasporates the problem even more.
LOOK--->
The programme that you provided indicted that you where reading the port
pin then modifing it, this will cause unknown state to be read from the
pin. You must include some form of shadow register for the pin, modify this
then write that out.
Try this: -
Loop: ;entry
movlw .1
xorwf shadow_register,f ;not a good idea as it effects a
ll the bits
btfss shadow_register,1
goto set low
bsf PORTB,0
goto delay
set_low
bcf PORTB,0
delay
nop
nop
nop
goto Loop
end
movf shadow_register,w
Your stuff
{Quote hidden}>>Here's the source for working :
>>
>>m015 MOVLW .1
>>00F0 1283 0529 BCF 0x03,RP0
>>00F1 1303 0530 BCF 0x03,RP1
>>00F2 0685 0531 XORWF PORTA,1
>>00F3 0000 0533 NOP
>>00F4 0000 0535 NOP
>>00F5 0000 0537 NOP
>>00F6 0000 0539 NOP
>>00F7 0000 0541 NOP
>>00F8 1685 0544 BSF PORTA,5
>>00F9 1285 0546 BCF PORTA,5
>>00FA 28EF 0549 GOTO m015
Dunno why this seems to work cosmic radiation or something
>>
>>And for not working :
>>m015 MOVLW .1
>>00F0 1283 0529 BCF 0x03,RP0
>>00F1 1303 0530 BCF 0x03,RP1
>>00F2 0685 0531 XORWF PORTA,1 This reads PORTA
then XORs that
value. If you take a look at the port structure of the PIC you will see
that reading this point will NOT read what you wrote, but what the pin
sees, note that the driver is disconnected during this phase, hence why you
don't see what you think you see.
>>00F3 0000 0533 NOP
>>00F4 0000 0535 NOP
>>00F5 0000 0537 NOP
>>00F6 0000 0539 NOP
>>00F7 0000 0541 NOP
>>00F8 28EF 0547 GOTO m015
>>
Dennis
'PIC16F876 Hardware bug and who do I tell? RTFM'
1999\11\03@202616
by
Dan Larson
|
On Wed, 3 Nov 1999 17:08:40 -0800, Erik Reikes wrote:
>
>And how dumb am I?
>
>I looked at the adcon1 and didn't properly read the mapping. I shouldn't
>have discarded your suggestion of checking adcon1 so quickly. After some
>thought (cursing and yelling... ;) )I went back to it and sure enough I had
>left that pin in AD mode. Its a wonder I got anything out of it.
>
>So I had it set up as an output, AD channel, and I was writing to it. What
>I was getting out were sporadic blips depending on what else I did with the
>port as a whole.
>
>Mea culpa, mea culpa. I be dumb.
>
>Thanks for all of the suggestions from everyone. I have changed the
>subject line appropriately to RTFM... We all know what that means.
>
RTFM was all I *could* do while I waited and waited and waited
to get my hands on a couple of 'F87X. Notice that you would also have
the same problem with the 'C7X, since their A/D's are set up the same
way.
Dan
'Help with PicStart hardware'
1999\11\24@071335
by
Octavio Nogueira
I'm trying to find the manufacturer of a IC in the
PicStart board, it's a SO8 dual SPST switch and it's
marked H721A.
I've found the analog device ADG721, but I'd like to know
others manufacturers.
Friendly Regards
Octavio Nogueira
===================================================
EraseMEnogueira
KILLspampropic2.com ICQ# 19841898
ProPic tools - low cost PIC programmer and emulator
http://www.propic2.com
===================================================
1999\11\24@192617
by
fleatech
Its a HARRIS semi part.
Octavio Nogueira wrote:
>
> I'm trying to find the manufacturer of a IC in the
> PicStart board, it's a SO8 dual SPST switch and it's
> marked H721A.
Nino
--
******************************************************
* Antonio (Nino) Benci *
* Professional Officer / Electronic Services Manager *
* Monash University - Dept of Physics *
* WWW - http://www.physics.monash.edu.au/ *
******************************************************
1999\11\24@214519
by
Jim Robertson
At 10:11 24/11/99 -0200, you wrote:
>I'm trying to find the manufacturer of a IC in the
>PicStart board, it's a SO8 dual SPST switch and it's
>marked H721A.
I think its a diode network to clip any voltages over VDD or
VPP. Have a closer look.
Jim
{Quote hidden}>I've found the analog device ADG721, but I'd like to know
>others manufacturers.
>
>Friendly Regards
>
>Octavio Nogueira
>===================================================
>
EraseMEnogueiraRemoveME
propic2.com ICQ# 19841898
>ProPic tools - low cost PIC programmer and emulator
>
http://www.propic2.com
>===================================================
>
Regards,
Jim Robertson
NEWFOUND ELECTRONICS
________________________________________
Email: .....newfound
spam_OUTpipeline.com.au
http://www.new-elect.com
MPLAB compatible PIC programmers.
________________________________________
1999\11\25@071803
by
Octavio Nogueira
> At 10:11 24/11/99 -0200, you wrote:
> >I'm trying to find the manufacturer of a IC in the
> >PicStart board, it's a SO8 dual SPST switch and it's
> >marked H721A.
>
> I think its a diode network to clip any voltages over VDD or
> VPP. Have a closer look.
>
> Jim
No, it's not, I'm sure it's a SPST switch.
Friendly Regards
Octavio Nogueira
===================================================
@spam@nogueiraEraseME
spampropic2.com ICQ# 19841898
ProPic tools - low cost PIC programmer and emulator
http://www.propic2.com
===================================================
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- Today
- New search...