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

Truncated match.
PICList Thread
'Newbie Questions'
1995\10\25@220212 by Ben L Wirz

flavicon
face
       I have a few basic question that I could really use some help with!

1)  What does weak pull up mean?

2)  On the 16c84 there are references to configuration fuses.  Am I
correct to believe these are implemented in eeprom and can be changed by
reprograming?  Is this also true for the code protect fuse?

3)  Please define accumulator and literal

4)  Is it ok to use a "can" type oscillators instead of a crystal/cap setup.


       I know these are pretty basic, but you have to start somewhere.  Thats
all for now, but I am sure I will have more latter.  I just got my programer
working today, and I am anxious to get coding.

Thanks,

Ben
spam_OUTblw2TakeThisOuTspamcec.wustl.edu

1995\10\25@225536 by Mike Keitz

flavicon
face
>        I have a few basic question that I could really use some help with!
I'm assuming you've read the 16C84 data sheet, and the questions are in
reference to that.
>
>1)  What does weak pull up mean?

On the 16C84 (and other 14-bit PICs?), the weak pull-up is a current source
of about 100 microamps on each port B pin.  The pull-up is enabled only if
the pin is set to be input, and bit 7 of the option register is 0.  If bit 7
of the option register is 1, all 8 pull-ups are disabled.  (Reset sets bit 7
to 0, so the pull-ups will be enabled until you change the option register.)
Their purpose is to eliminate the need for pull-up resistors when using
switches to ground or open-collector drivers to drive port B inputs.
>
>2)  On the 16c84 there are references to configuration fuses.  Am I
>correct to believe these are implemented in eeprom and can be changed by
>reprograming?  Is this also true for the code protect fuse?

Yes.  All the fuses can be reprogrammed, including the code protect fuse.
The 16C84 was designed to not allow the code-protect fuse to be written back
to 'unprotected' unless all the code and data EEPROM was erased as well.
But there is a simple and reliable process to defeat this, so data in a
16C84 cannot be secured against even simple attempts to crack it.  Microchip
is rumored to be working on a more secure version.

Some of the newer 'erasable' EPROM PICs are rumored to have uneraseable
code-protect fuses.  They can't be re-used once the code-protect is set.
Especially with fly-by-night programmers, it's probably safest not to set
the code-protect fuse unless you are releasing a final version.

>3)  Please define accumulator and literal

The accumulator is the 8-bit W register.  It can be a destination for the
result of any arithmetic/logical instruction, and is the source for most of
them as well.

A literal is a constant determined at assemble or compile-time.  It is
stored in program memory as an 8-bit field of the instruction.  It will be
loaded into the W register, or used as part of an arithmetic or logical
operation when the instruction executes.
>
>4)  Is it ok to use a "can" type oscillators instead of a crystal/cap setup.

Yes.  Set the oscillator for LP, XT or HS, depending on the frequency, and
input the oscillator signal to OSC1.  Leave OSC2 open.  The output high
level from the oscillator must reach 0.7 Vdd; some of the "TTL" oscillator
cans do not output this much.  Try a pull-up resistor.  For prototypes of
course, it is likely the PIC will work with less than the 0.7 Vdd minimum
anyway.  An oscillator can rated for CMOS logic levels will be OK.

-Mike

1995\10\26@051927 by Markus Imhof

flavicon
face
>        I have a few basic question that I could really use some help with!
>
>1)  What does weak pull up mean?

What it says: a circuit delivering a low current (10 uA, IIRC) to set the
port B inputs to a defined high state.

>
>2)  On the 16c84 there are references to configuration fuses.  Am I
>correct to believe these are implemented in eeprom and can be changed by
>reprograming?  Is this also true for the code protect fuse?
>

Yes to the first, don't know to the second (but I think not).

>3)  Please define accumulator and literal

Accumulator: a special purpose register, which can be affected by more
instructions than you could believe :-)
Literal: a number, as opposed to (the name of) a register

Bye
 Markus


P.S. And what is a 'can' oscillator ?

1995\10\26@071623 by pert%cogsci.ed.ac.uk%UKACRL.bitnet

flavicon
face
C'VNLXN$M|7SKnHKk,x(n&E,38\5j]K=7o;~mY}c9]{?++jAZM.lVHk0~.q%UA5V#rUsWP]C^Y0h^/
       13:7T+o'~Sxw7m'CR3&:1@_nPsJ2GrcHl,[Q:&k6`Y4*+av;

>>>>> Markus Imhof <.....bd24KILLspamspam@spam@RZ.UNI-KARLSRUHE.DE> writes:

>> I have a few basic question that I could really use some help with!
>>
>> 1) What does weak pull up mean?

> What it says: a circuit delivering a low current (10 uA, IIRC) to
> set the port B inputs to a defined high state.

The data book says it's typically 100uA, but I recently had a circuit
that didn't work properly which turned out to be because my weak pull
ups were sourcing nearly 200uA each.
                                       --Jasper

1995\10\26@185305 by jhobbs

flavicon
face
>        I have a few basic question that I could really use some help with!
>
>1)  What does weak pull up mean?
If refering to PORTB internal pull-up, then it means that you will need
about 100 uA to drive the I/O.  The pin only needs 1 uA to drive it, so this
is 100* over, this is probabley quite fine.  Helps protect you from
background noise, EMF, etc.

If not refering to PORTB internal pull-up, then it means min. current needed
to drive  I/O line. Means you need a lower value.  I would recommend a 10k
resister, this is plenty stiff enough.

>2)  On the 16c84 there are references to configuration fuses.  Am I
>correct to believe these are implemented in eeprom and can be changed by
>reprogramming?  Is this also true for the code protect fuse?

There are configuration fuses (addr: 2007h), and they are in EEPROM and they
can be changed by reprogramming.
Yes, the code protect fuses can be reprogrammed.  It is the last one to be
programmed, so you can not "easily" ;) get code out of these parts.  If you
do not have a PIC16C84 data sheet (DS30081D) you should get one.  On page 22
it explains some of this information that you are curious about.  You can
call Parallax (916) 624-8333 and ask for one complementary data sheet.

>3)  Please define accumulator and literal

Accumulator; With regards to PICs that would be the W register.  The W
register is an 8 bit working register (or accumulator) used for ALU
operations.  It is not in the data memory. It is used to hold totals or
stores numbers with regards to instruction being used.

Literal;  It is a hard value.  It can not change.  An equate is how a
literal is defined.  Equates are shortcuts in your program and are easier to
read and work with.  By being able to change a single equate at the
beginning of your SRC code you can effect the entire program at once (global
change) vs. hand editing every use of some value. i.e. save time!


>4)  Is it ok to use a "can" type oscillators instead of a crystal/cap setup.

You can use a 8-pin osc. pack, 14-pin osc. pack,  RC, crystal, ceramic res.
or function generator.  Just about anything that's CMOS, TTL.


{Quote hidden}

Jim was here just a moment ago...

1995\10\26@213855 by Edward Tang

picon face
       Where is the web site of Circullar Ink BBS?

Kind regards,
Edward Tang

1995\10\27@003244 by John Payson

flavicon
face
> >4)  Is it ok to use a "can" type oscillators instead of a crystal/cap setup.
>
> You can use a 8-pin osc. pack, 14-pin osc. pack,  RC, crystal, ceramic res.
> or function generator.  Just about anything that's CMOS, TTL.

Is it possible, when using an external oscillator, to have the chip wake
instantly from sleep mode (if the oscillator is running?)  Normally the
16c5x and 16cxx have an oscillator startup timer except in the RC mode.
Can the RC mode by made to accept an external oscillator signal (via some
suitable resistor or capacitive coupling perhaps?)

1995\10\27@130553 by jhobbs

flavicon
face
At 11:32 PM 10/26/95 -0500, you wrote:
>> >4)  Is it ok to use a "can" type oscillators instead of a crystal/cap setup.
>>
>> You can use a 8-pin osc. pack, 14-pin osc. pack,  RC, crystal, ceramic res.
>> or function generator.  Just about anything that's CMOS, TTL.
>
>Is it possible, when using an external oscillator, to have the chip wake
>instantly from sleep mode (if the oscillator is running?)  Normally the
>16c5x and 16cxx have an oscillator startup timer except in the RC mode.
>Can the RC mode by made to accept an external oscillator signal (via some
>suitable resistor or capacitive coupling perhaps?)
>
Here is the deal, as far as I can tell.  In RC mode you will always have a
72ms power-up.  In all others you can have either '1024 osc cycles' or '72ms
+ 1024 osc cycles'.  This is in all the 'xx data sheets, pg 16 of the '84
data sheet.


          PWRTE=1      PWRTE=0
---------------------------------------
xt,hs,lp | 72ms +     | 1024 tosc
        | 1024 tosc  |
---------------------------------------
rc       | 72ms       |
---------------------------------------


take care...

Jim was here just a moment ago...

1995\10\27@172752 by John Payson

flavicon
face
> At 11:32 PM 10/26/95 -0500, you wrote:
 [supercat]
> >Is it possible, when using an external oscillator, to have the chip wake
> >instantly from sleep mode (if the oscillator is running?)  Normally the
> >16c5x and 16cxx have an oscillator startup timer except in the RC mode.
> >Can the RC mode by made to accept an external oscillator signal (via some
> >suitable resistor or capacitive coupling perhaps?)
 [hobbes]
{Quote hidden}

Right, for powerup those timings apply.  For a reset from sleep, however,
only the 1024tosc [if XT, HS, or LP] is applied [nothing at all if RC].  My
question is whether it's possible to use the RC mode with an external osc-
illator so as to dispense with the extra 1024tosc.

1995\10\27@192234 by jhobbs

flavicon
face
At 04:19 PM 10/27/95 -0500, you wrote:
{Quote hidden}

The answer is no with an external osc.  When programmed as an RC the PIC is
driving osc1.  On osc1 when the V gets to a certain level (say 4V) the pic
pulls it down.  When it pulls it to some low level (say 1V) it lets it go to
float back up, and so on.  On osc2 it is clocking out osc1/4.

Hope this helps..

Jim was here just a moment ago...

1995\10\27@210431 by John Payson

flavicon
face
> The answer is no with an external osc.  When programmed as an RC the PIC is
> driving osc1.  On osc1 when the V gets to a certain level (say 4V) the pic
> pulls it down.  When it pulls it to some low level (say 1V) it lets it go to
> float back up, and so on.  On osc2 it is clocking out osc1/4.

Right; what I was wondering about was whether, e.g., connecting a capacitor
between an external oscillator signal and the osc1 pin would allow the PIC
to run at the rate set by that oscillator [when the oscillator goes high,
the PIC side of the cap would go high too until the PIC pulled it down; when
the oscillator goes low, the cap would be discharged into the PIC's negative
rail].  Would this be reliable for reasonable speeds? [e.g. 10Hz to 10Mhz?]

1995\10\28@001837 by Mike Keitz

flavicon
face
>> The answer is no with an external osc.  When programmed as an RC the PIC is
>> driving osc1.  On osc1 when the V gets to a certain level (say 4V) the pic
>> pulls it down.  When it pulls it to some low level (say 1V) it lets it go to
>> float back up, and so on.  On osc2 it is clocking out osc1/4.
>
>Right; what I was wondering about was whether, e.g., connecting a capacitor
>between an external oscillator signal and the osc1 pin would allow the PIC
>to run at the rate set by that oscillator [when the oscillator goes high,
>the PIC side of the cap would go high too until the PIC pulled it down; when
>the oscillator goes low, the cap would be discharged into the PIC's negative
>rail].  Would this be reliable for reasonable speeds? [e.g. 10Hz to 10Mhz?]
>
Probably not too reliable.  The PIC would tend to oscillate by itself using
your capacitor and whatever leakage resistance was there.  Although
specifically not recommended, maybe biasing the OSC1 pin to +2.5V or so and
then couping in your oscillator through a rather small capacitor could work.
Another possibility would be to run the RC oscillator normally, but couple
in a synchronizing signal via a voltage divider connected to the
normally-grounded end of the capacitor.  The rising edges of the external
oscillator would couple through the capacitor and trigger the PIC
prematurely, causing the RC oscillator to speed up and match the external
oscillator, provided the difference isn't too great (may not be possible to
guarantee that with PIC and component tolerances).

Figure 4.0.1 in my (regrettably still preliminary) 1994 data book
"Simplified Block Diagram of On-Chip Reset Circuit" suggests that the 1024
Tosc timer is active only for the XT or LP modes (i.e. not HS).  However,
the table posted by someone else and also shown in this book, as well as the
text, conflicts with that.  Could someone at Microchip confirm that it is
active in the HS mode as well?

With an external oscillator, at least the time from wake-up to execution of
the first instruction will be predictable (256 instruction cycles, or only
0.256 ms at 4 MHz), not a few ms + 256 instruction cycles which would occur
if the internal oscillator with a crystal were used.

-Mike


'Newbie questions'
1997\02\05@090106 by Bill Durocher
flavicon
face
Hello all:
   I just joined this list recently, and I would like to post a couple of questions and issues.  Please keep in mind that I am new to the PIC and to the PIClist.

Can the 16C84 and/or 16C54 use a TTL clock source?  Specifically, can you successfully use a 555 timer for the clock input.
I tried this last night with a slow 555 circuit so I could see the program execute, but I got some strange results.  The 555 is configured to produce a frequency of just more than one Hertz, the waveform is mostly high with low pulses.  I then ran the output of the 555 through a 7400 wired as an inverter thereby getting a waveform of mostly low with high pulses.  To help shape the wave form better, I ran it through a 74LS32.  When I took that output and put it on the input of my 16C54 (which had been programmed to read switches on port A and light LEDs on port B and use a crystal for its clock source) nothing seemed to happen.  I noticed that when I pulled the wire feeding the PIC out of the breadboard, the LEDs would flash, after fooling around a little bit, I found that if I simply held the clock input wire between my fingers, the program would run.  A bit more fooling around and I discovered that just having the clock wire in the breadboard at the PICs input, but DISCONNECTED (actually pointing into the air) at the 555s input the program still ran.  If I removed power from the 555, the program stopped.

The PIC circuit and the clock circuit each have their own breadboard (though they have a common power supply).

Am I seeing expected operations?  Is there anything I can do to use the 555 for a timer?

-Bill D.

1997\02\05@105208 by myke predko

flavicon
face
Boy Bill, you're really keeping Microchip honest with the "DC-xxMHz" spec
for the PIC!

Reading through the note, the feeling I get is, wouldn't it be simpler to
use a simulator (either MPLAB's or MPSIM) with a Stimulus file?  Then, when
you try it out on the PIC, you could use an RC Clock and bypass the 555
altogether?

>Can the 16C84 and/or 16C54 use a TTL clock source?  Specifically, can you
successfully use a 555 timer for the clock input.

Yes, you *should* be able to.  How have you set the configuration fuses
(should be "LP") and how are you running in the clock line into the PIC
(should be into OSC1)?

>I tried this last night with a slow 555 circuit so I could see the program
execute, but I got some strange results.  The 555 is configured to produce a
frequency of just more than one Hertz, the waveform is mostly high with low
pulses.

It's been many years since I have opened up my "555 Cookbook", but a few
comments.  Isn't the 555 pretty unstable at this low a frequency?  I would
also think that it should be setup as a square wave, not a system of pulses.

Have you looked at the waveform with a 'scope (obviously a storage one for
these frequencies)?  I'm wondering if you are getting: slow rise/fall times,
transients, or ringing.

>I then ran the output of the 555 through a 7400 wired as an inverter
thereby getting a waveform of mostly low with high pulses.  To help shape
the wave form better, I ran it through a 74LS32.  When I took that output
and put it on the input of my 16C54 (which had been programmed to read
switches on port A and light LEDs on port B and use a crystal for its clock
source) nothing seemed to happen.

This is why I was questioning what the waveform looks like.  Why don't you
try an RC Clock, with the program:

 movlw  0x01E                  ;  RA0 is Output
 tris   PORTA                  ;   NOTE!!! This will cause a Warning in 'C84
Loop                            ;  Come back to Here, Forever
 btfsc  PORTB, 0               ;  Use RB0 as Button Input
  goto  ButtonHI
Buttonlo                        ;  The Button is Low
 bcf    PORTA, 0               ;  Make the Output Low
 goto   Loop
ButtonHI                        ;  The Button is High
 bsf    PORTA, 0
 goto   Loop

With a Pull up and a momentary on pushbutton switch pulling down to Ground
on RB0 and an LED and current limiting resistor attached to RA0 and Vdd.

It's a simple program and a pretty good one to get started with.

>I noticed that when I pulled the wire feeding the PIC out of the
breadboard, the LEDs would flash, after fooling around a little bit, I found
that if I simply held the clock input wire between my fingers, the program
would run.  A bit more fooling around and I discovered that just having the
clock wire in the breadboard at the PICs input, but DISCONNECTED (actually
pointing into the air) at the 555s input the program still ran.  If I
removed power from the 555, the program stopped.

After reading this, I'm pretty much convinced you've got an unstable circuit.

>The PIC circuit and the clock circuit each have their own breadboard
(though they have a common power supply).

How is the Ground made common between the boards?

>Am I seeing expected operations?  Is there anything I can do to use the 555
for a timer?

If you are expecting the unexpected (sorry, I couldn't resist), then yes.  I
think you have too many unknowns.

Go through the PIC Datasheets and try to make your circuit simpler.  Once
you get something running, then go on to more complex clocking schemes.

Good Luck,

myke

"I don't do anything that anybody else in good physical condition and
unlimited funds couldn't do" - Bruce Wayne

1997\02\05@112739 by ermott

flavicon
face
With regard to the program executing when the clock signal is disconnected:

CMOS circuits require that all inputs be connected to power, ground or
a signal.  Otherwise the input can float about at unpredictable levels
causing intermittent and spurious behavior.  We sometimes troubleshoot
circuits by touching the CMOS chips to see if body capacitance will
cause a change of state when things won't run properly.  I suspect you
are actually providing a crude clock signal to the PIC with the clock
input floating about at strange levels and being changed enough as you
fiddle with the wiring to cause a clock signal for the program.

I don't have any experience with PIC devices (I'm expecting delivery of
my PICstart programmer today) yet so I find this list very informative
when people are dealing with these kinds of issues.

Good luck,

Andrew

1997\02\05@114449 by Bill Durocher

flavicon
face
Myke:

   I know that the circuit I described seems a little awkward (mostly because I built it from available parts), but there is a method for my madness.  I hope to be able to set this circuit up (and make it work) so that I can implement a trouble-shooting clock which would have two different oscillators.  One would be adjustable (from approx 1Hz to some upper limit, but still slow) the other would be a pulse generator which would cause the PIC to execute one instruction.  This would allow for human-speed monitoring of the circuit under operation.

    I will set the oscillator type to LP (currently XT) and let you know.  Currently I do not have a scope available although I am lining one up.

Thanks for your input!

-Bill D.

1997\02\05@115854 by Bill Durocher

flavicon
face
Andrew:
¯     CMOS circuits require that all inputs be connected to power, ground or
¯     a signal.

I agree, but....

¯     I suspect you are actually providing a crude clock signal to the PIC with the clock
¯     input floating about at strange levels and being changed enough as you
¯     fiddle with the wiring to cause a clock signal for the program.

With an LED still connected to my clock (and the OSC1 connected to a wire that is pointing into space) I see the program execute in time with the clock LED.  When the clock is un-powered, the PIC ceases to execute.  Also, with this configuration, I am not touching the OSC1 input wire.

-Bill D.

1997\02\05@130328 by Brian Boles

flavicon
face
    Sounds like the PIC is in RC oscillator mode.  When you give it some
    capacitance, it oscillates.  You need to use LP or XT mode for
    external clock.

    Rgds, Brian.


______________________________ Reply Separator _________________________________
Subject: Newbie questions
Author:  Bill Durocher <.....durocherKILLspamspam.....BETAONE.MKO.DEC.COM> at Internet_Exchange
Date:    2/5/97 8:54 AM


Hello all:
   I just joined this list recently, and I would like to post a couple of
questions and issues.  Please keep in mind that I am new to the PIC and to the
PIClist.

Can the 16C84 and/or 16C54 use a TTL clock source?  Specifically, can you
successfully use a 555 timer for the clock input.
I tried this last night with a slow 555 circuit so I could see the program
execute, but I got some strange results.  The 555 is configured to produce a
frequency of just more than one Hertz, the waveform is mostly high with low
pulses.  I then ran the output of the 555 through a 7400 wired as an inverter
thereby getting a waveform of mostly low with high pulses.  To help shape the
wave form better, I ran it through a 74LS32.  When I took that output and put it
on the input of my 16C54 (which had been programmed to read switches on port A
and light LEDs on port B and use a crystal for its clock source) nothing seemed
to happen.  I noticed that when I pulled the wire feeding the PIC out of the
breadboard, the LEDs would flash, after fooling around a little bit, I found
that if I simply held the clock input wire between my fingers, the program would
run.  A bit more fooling around and I discovered that just having the clock wire
in the breadboard at the PICs input, but DISCONNECTED (actually pointing into
the aiir) at the 555s input the program still ran.  If I removed power from the
555, the program stopped.

The PIC circuit and the clock circuit each have their own breadboard (though
they have a common power supply).

Am I seeing expected operations?  Is there anything I can do to use the 555 for
a timer?

-Bill D.


'Newbie Questions'
1997\05\28@034254 by Ross McKenzie
flavicon
face
Hello Everyone,

I am a newbie to the world of PIC devices having a distant history with the
6809 family.

Am looking for some system design guidance from those of you for whom my
task is old-hat.

I have not yet chosen a device or indeed a programming/development
environment so any input, without causing a "mine is better than yours" type
war, would also be appreciated.

The specs follow (sorry in advance about the length of the story):-

Up to 4 independent sensors, each with an RS232 output at 1200 baud, no
parity, 8 bits and 2 stop bits, produce a near continuous data flow which
may include a warning or alarm message in the format *W1 or *A1, where the
numeral may be between 1 and 7. There is no synchronisation of serial comms
between any of the 4 instruments.

Each of the 4 data streams is to be examined for any alarm/warning and then
produce an output current (4..20 mA) proportional to the largest magnitude
of the trailing numeral. So A1 would be greater than any W#.

My first concept goes as follows. Four opto isolators accord protection and
produce 4 unipolar data streams, one for each sensor, which are directed to
a PIC device for each channel. Each PIC tests for the telltale leading *
character. It then tests for a W or A as the next character and finally
extracts the number. An alarm number is then offset by say a value of 7.
This offsetting then yields warnings from 1..7 and alarms from 8..14. A
value of 0 would indicate the absence of any warning or alarm.

Each channel's value would then be written to the parallel output of its own
PIC and latched. These outputs would then be fed to a small combination of
say 4585 4 bit magnitude comparators so that the largest value of the 4
channels of warnings/alarms is finally available to drive a DAC and thence
produce a 4..20 mA output proportional to the warning/alarms (4 mA being the
all-OK level).

Questions:-

1. I am assuming that the RS232 data streams must have dedicated PICs.

2. Would a newbie be able to produce this level of processing without going
bald or should a Basic Stamp version be used?

3. Should the comparator/DAC combination be replaced by a PIC with a PWM
output feeding a filtered OpAmp stage?

4. Which development machine could be used economically for a production of
say 10 units?

Appreciate all and any insights.

Regards,

Ross McKenzie
Melbourne Australia

1997\05\28@204828 by Steve Hardy

flavicon
face
> From: Ross McKenzie <EraseMER.McKenziespam_OUTspamTakeThisOuTSENCON.COM>
> Questions:-
>
> 1. I am assuming that the RS232 data streams must have dedicated PICs.

Most probably, although at the slow speed of 1200bps it may be possible
to receive several with one PIC.  For example, poll 4 inputs looking
for change of state.  At each change, determine whether a start bit has
been detected.  For this input, take timestamps of each transition for
at least a period of (1+8+2)*3 bit-times.  After this, post-analyse the
results to decode the characters received.  This may require more
memory than is available in a 16C84, but would easily fit in a 16C74.
A 10MHz device would be able to execute over 2000 instructions in each
bit-time for one input, which I think would be adequate.  Of course the
16C74 has a hardware UART, so the other three inputs would be done this
way.  Note that selection of the correct oscillator frequency for the
device would simplify the code -- you would want to set the speed so
that the     clock_period is some nice fraction of 1/1200 sec, i.e.
clk_freq = 1200 * 2^n.  E.g. for n = 13, clk_freq = 9.8304MHz.  This
would allow use of TMR0 as the timestamp generator, with very simple
analysis of the results.  Alternatively, you could get a reasonable
clock by using the compare mode of TMR1, which is basically a divide-by-n
counter (n = 1..65536).

>
> 2. Would a newbie be able to produce this level of processing without going
> bald or should a Basic Stamp version be used?

Yes, PIC is very easy to learn.  Sorry, don't know if a basic stamp would
be up to the task (of doing 4 inputs at once) but it should do one
input no worries.

>
> 3. Should the comparator/DAC combination be replaced by a PIC with a PWM
> output feeding a filtered OpAmp stage?

This would certainly be lower parts count.  If you could manage the 4
inputs with one PIC16C74, then this would have no externals apart from
an RC filter (for smoothing the PWM) and a 4-20mA converter.

>
> 4. Which development machine could be used economically for a production of
> say 10 units?

Never done production, so can't help there

Regards,
SJH
Canberra, Australia


'Newbie Questions'
1997\09\12@044148 by bejones
flavicon
face
Hi all,
        just started playing with 16C84's.

1) Saw several appends last week re random number generators. This
was of course before I started playing and before I decided on a
project (where I desperately need an algorithm to generate a random
integer in the range 0-n (where n is in a file)) so threw them all
away. Would some kind soul send to my reader.

2) Getting doc from MicroChip page seems terribly slooooow. Any
mirrors? Following question would be answered if I could readily get
the doc!!

3) Now the dumb newby question. Just wrote first real program
(flashes 'HELLO WORLD' in morse on a LED). Running in MPLAB I does
table look-ups with RETLW OK but when I CALL a subroutine the
simulator stops on the subroutine RETURN and I can't seem to carry on
stepping. Code works fine when I load it into 16C84 but this does
make debugging hard. Also what does the SIM do re a WDT SLEEP?
(You can probably tell I'm used to PC coding debuggers as oppoesed to
simulators!!)

Thanks for your help and apologies for last dumb question.

Brian
Brian Jones
Java Technology Centre
IBM Hursley

1997\09\12@103800 by bejones

flavicon
face
All,
     hope this hasn't come to you twice - looks like the first
bounced.

Just this week started playing with 16C84 and am now starting my
first project, a Morse code tutor. Guess what - having decided on
this project  I suddenly realise I need one of those random number
generators (generate an integer between 0 and N where N is in a
file) that I discarded from PICLIST last week :-(  Would some kind
soul please send direct to my reader thanks.

Does Microchip have a European mirror - seems very slooooow to
download docs.

Since I have no docs here is the dumb newby question. Code to date
just flashes 'HELLO WORLD' in Morse on a LED. All works OK but have a
problem with MPLAB. Tables using RETLW work OK but when I CALL a
subroutine I seem to stop single stepping at the RETURN. Do I have to
set something up in MPLAB for CALL/RETURN single stepping to work OK?
All works fine when loaded into the 16C84 so just makes debugging
harder. Also how does MPLAB cope with SLEEP (WDT) in single step. Do
I have to go clear timers manually (this may be the problem as the
SLEEP is immediately prior to the RETURN but  MPLAB is highlighting
the RETURN instruction when it halts).

Apologies if that is a really dumb question - I guess I'm applying
software debugger thinking to a simulator. Hopefully I'll get the
docs downloaded today.


Brian
Brian Jones
Java Technology Centre
IBM Hursley

1997\09\12@132347 by myke predko

flavicon
face
Brian Jones wrote:

>Since I have no docs here is the dumb newby question. Code to date
>just flashes 'HELLO WORLD' in Morse on a LED. All works OK but have a
>problem with MPLAB. Tables using RETLW work OK but when I CALL a
>subroutine I seem to stop single stepping at the RETURN. Do I have to
>set something up in MPLAB for CALL/RETURN single stepping to work OK?
>All works fine when loaded into the 16C84 so just makes debugging
>harder. Also how does MPLAB cope with SLEEP (WDT) in single step. Do
>I have to go clear timers manually (this may be the problem as the
>SLEEP is immediately prior to the RETURN but  MPLAB is highlighting
>the RETURN instruction when it halts).

With MPLAB, what device have you set up as under "options" - "Development
Mode"?
It should be 16C84.  (I don't know what the default is).  If you have the wrong
device (ie a low-end device), this may be your problem.

>Apologies if that is a really dumb question - I guess I'm applying
>software debugger thinking to a simulator. Hopefully I'll get the
>docs downloaded today.

No problem, let us know what the final problem is.

myke

"One must invoke enough raw truth to punch a hole in the world" - Darl Af


'newbie questions'
1998\06\01@125145 by philb
flavicon
face
Just wanted to write a thank you to all those who responded (privately
and publicly) with my questions.  Got my first program up and running.

Thanks again,


Phil Bernard

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