Searching \ for 'newbie question' 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+question
Search entire site for: 'newbie question'.

Truncated match.
PICList Thread
'Newbie question'
1996\12\02@170142 by Rajesh Bawankule

flavicon
face
Hi All
       I am new to this list. I just started taking interest in PIC chips.
       I bought 1] Microchip's PIC databook
                2] Embedded controller handbook.

       Please suggest me.

       1] Good books, magazines, web resources on PIC.

       2] Good PIC programmer.
          [ I am confused between so many types available in market.
          Can anyone post a summary of all the options available so
          that I and other novice people can take a good decision.}

       Thanks a lot for your time for a newbie like me.

       Rajesh Bawankule

1996\12\02@183150 by squareone

flavicon
face
>>        Rajesh Bawankule wrote
.....
>        Please suggest me.
>
>        1] Good books, magazines, web resources on PIC.

Dear Rajesh,

Please visit our website http://www.zapcom.net/~squareone for table of
contents for beginner's book and ordering information.  The book is
entitled, "Easy PIC'n, A Beginner's Guide to Using PIC16/17
Microcontrollers" (ISBN # 0-9654162-0-8) by David Benson, Square 1
Electronics.  Also, an intermediate book entitled, "PIC'n Up the Pace" and
an advanced book are coming soon.

Good electronics magazines are "Nuts and Volts," "Circuit Cellar Ink" and
"Electronics Now" to name a few.

There are links to other PIC resources listed at our website, also.

Good luck and have fun!

David/Wanda Benson
Square 1 Electronics
P.O. Box 501
Kelseyville, CA 95451 USA
(707)279-8881 voice
(707)279-8883 fax
spam_OUTsquareoneTakeThisOuTspamzapcom.net (e-mail)

David/Wanda Benson
Square 1 Electronics
POB 501
Kelseyville, Calif. 95451 USA
(707)279-8881 voice
(707)279-8883 fax
squareone@zapcom (E-mail)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
=-=-=
http://www.zapcom.net/~squareone (Table of Contents for "Easy PIC'n)
"Easy PIC'n, A Beginner's Guide to Using PIC16/17 Microcontrollers" by
David Benson ISBN 0-9654162-0-8, $29.95, published by Square 1
Electronics-intermediate, advanced and PIC project books to soon be
released.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
=-=-=

1996\12\03@135526 by Don McKenzie

flavicon
face
Rajesh Bawankule wrote:
> Hi All
>         I am new to this list. I just started taking interest in PIC chips.
>         I bought 1] Microchip's PIC databook
>                  2] Embedded controller handbook.
>         Please suggest me.
>         1] Good books, magazines, web resources on PIC.
>         2] Good PIC programmer.
>            [ I am confused between so many types available in market.
>            Can anyone post a summary of all the options available so
>            that I and other novice people can take a good decision.}
>         Thanks a lot for your time for a newbie like me.
>         Rajesh Bawankule

The PIC16C84/04/P is an 18 pin DIP single chip MicroController available
at
very low cost even in single quantities. It can be re-programmed
thousands
of times, each time in a few seconds with very cheap Printer Port driven
hardware (basically a 7407 and power supply) and the software is free.
It's
considered the 'Newbie' starting point for PIC related projects, and can
be
run in a minimal configuration with just a power source and a single
resistor and capacitor.

You will find the software drivers, circuit, and overlay at:
http://labyrinth.net.au/~donmck/84.html

For other PIC resources, books, magazines, programmers etc., try my home
page at:
http://www.labyrinth.net.au/~donmck

Don McKenzie .....donmckKILLspamspam@spam@labyrinth.net.au
SimmStick(tm) A PIC proto PCB the size of a 30 pin Simm Memory Module.
EASY PIC'n Beginners Guide to using PIC 16/17 MicroChip products.
MEL PicBasic Compiler. Programmers from 15 USD.  Pic-Axe(tm) A New Tool.


'Newbie question'
1997\04\28@175639 by Cesare Lavazza
flavicon
face
I'm interested to the PIC microcontrollers, especially the 16C84.
I know the Microchip Site.
But I still haven't found a 16C84 simple programmer schematics to
connect to the printer or the serial port of a PC.

Does anyone have a good, tested, simple 16C84 programmer schematic?
Thanks.

--
Saluti.

---------------------------------------------------
E-mail: Cesare.LavazzaspamKILLspamnemo.it
WWW:    http:\\radionostalgia.net\Users\Lavazza
       http:\\http://www.geocities.com\CapeCanaveral\4573

1997\04\28@192657 by Glen Benson

flavicon
face
Hi,

   I am working on a LPT shiftout solution right now. It seems straight
foward, since im also a newbe with pics, its not going as expedcted. I wrote
a windows DLL that gets analog data throgh the lpt from an ADC0808. Thought
I could modify that. If you find a routine please let me know, I will do
the same.

Thanks
Glen Benson


-------------------------- ----------------------------------------------
At 12:33 PM 4/27/97 +0200, you wrote:
{Quote hidden}

1997\04\28@230301 by Don McKenzie

flavicon
face
Cesare Lavazza wrote:
>
> I'm interested to the PIC microcontrollers, especially the 16C84.
> I know the Microchip Site.
> But I still haven't found a 16C84 simple programmer schematics to
> connect to the printer or the serial port of a PC.
>
> Does anyone have a good, tested, simple 16C84 programmer schematic?
> Thanks.
>
> --
> Saluti.
>
> ---------------------------------------------------
> E-mail: EraseMECesare.Lavazzaspam_OUTspamTakeThisOuTnemo.it
> WWW:    http:\\radionostalgia.net\Users\Lavazza
>         http:\\http://www.geocities.com\CapeCanaveral\4573

A free schematic, overlay, and operating software is available from:
http://www.dontronics.com/84.html
This one includes a 4PDT switch to allow programming of the 84 in the
target board.

Send a blank message to basicsspamspam_OUTdontronics.com for a more detailed
rundown on this and many web pointers to other simple 84 programmers.

Don McKenzie  @spam@donKILLspamspamdontronics.com   http://www.dontronics.com

PICSTART and Newfound PIC Programmers Firmware Upgrades.
SLI, the serial LCD that auto detects baud rates from 100 to 125K bps.
SimmStick(tm) A PIC proto PCB the size of a 30 pin Simm Memory Module.
Send a blank message to KILLspamhelpKILLspamspamdontronics.com for more info.

1997\04\30@131244 by KIMMO TOIVANEN

picon face
Artikkelissa <RemoveME33632B95.3E6DTakeThisOuTspamnemo.it>
spamBeGoneCesare.LavazzaspamBeGonespamNEMO.IT (Reply-To: TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU) (KS kirjoitti:

KM> But I still haven't found a 16C84 simple programmer schematics to
KM> connect to the printer or the serial port of a PC.
KM>
KM> Does anyone have a good, tested, simple 16C84 programmer schematic?
KM> Thanks.

You can try for example Schaer or David Tait's Topic. I built
my Schaer on a stripe-coppered protoboard. And it really works.
It looks like:

                                                 +5V
15..30V                                           |14
                 +-------+                     +--+--+
V+ ]--|>|---+-----+ 78L05 +--- +5V              | 7407|
           |     +---+---+                     +--+--+
           |         |                            |7
           |        GND                          GND
           |     +-------+               A   K
           +-----+ 78L12 +--- +12V ------[LED]------[1k]----GND
                 +---+---+              "Power"
V- ]--- GND           |
                    GND                  A   K
                               Vpp ------[LED]------[1k]----GND
                                      "Activity"
                                                     Vdd
                                                      |14
                         Vdd-[10K]--+       +---------+--------+
                 1|\  2             |     13|                  |
 D0 (2)-----------+  >--------------+-------+ RB7/Data         |
                  |/                |       |                  |
     +5V-[10k]-+                    |       |                  |
               | 12 /|13            |       |    PIC 16C84     |
Busy (11)-------+--<  +--------------+       |     18 pin       |
                    \|                      |    ZIF Socket    |
                          Vdd-[10k]--+      |                  |
                 3|\  4              |    12|                  |
  D1 (3)----------+  >---------------+------+ RB6/Clock        |
                  |/                        |                  |
                          Vpp-[10K]--+      |                  |
                 5|\  6              |     4|                  |
  D2 (4)----------+  >---------------+------+ -MCLR/Vpp        |
                  |/                        |                  |
                                            +---------+--------+
                                                      |5
                                           +5V       GND
                                            |
                                 +--[10K]---+
                                 |          |
                11|\  10         |      B |/ E
            +-----+  >----[10K]--+--------|     PNP
            |     |/                      |\ C
            |                               |
            |                               +---Vdd
            |                               |
            |                             [10K]
            |                               |
            |                              GND
            |
            |                              +12V
            |                               |
            |                    +--[10K]---+
            |                    |          |
            |    9|\  8          |      B |/ E
  D3 (5)----+-----+  >----[10K]--+--------|     PNP
                  |/                      |\ C
                                            |
                                            +---Vpp
 GND (19)------GND                          |
                                          [10K]
                                            |
                                           GND



>From http://www.man.ac.uk/~mbhstdj/piclinks.html
you can find your way to Topic. It's quite nice because
it's at the same time a proto board. Easy to do, if you
can get your hands on laser printer (or a photocopier)
and UV-stuff to do the PCB.

I tried serial a serial programmer at first, but it didn't
do a thing with my computer.

Ecco a lei.


Kimmo


'Newbie question'
1997\05\09@113738 by KIMMO TOIVANEN
picon face
Artikkelissa <RemoveME33632B95.3E6DspamTakeThisOuTnemo.it>
Cesare.LavazzaEraseMEspam.....NEMO.IT (Reply-To: EraseMEPICLISTspamMITVMA.MIT.EDU) (KS kirjoitti:

KM> But I still haven't found a 16C84 simple programmer schematics to
KM> connect to the printer or the serial port of a PC.
KM>
KM> Does anyone have a good, tested, simple 16C84 programmer schematic?
KM> Thanks.

You can try for example Schaer or David Tait's Topic. I built
my Schaer on a stripe-coppered protoboard. And it really works.
It looks like:

                                                 +5V
15..30V                                           |14
                 +-------+                     +--+--+
V+ ]--|>|---+-----+ 78L05 +--- +5V              | 7407|
           |     +---+---+                     +--+--+
           |         |                            |7
           |        GND                          GND
           |     +-------+               A   K
           +-----+ 78L12 +--- +12V ------[LED]------[1k]----GND
                 +---+---+              "Power"
V- ]--- GND           |
                    GND                  A   K
                               Vpp ------[LED]------[1k]----GND
                                      "Activity"
                                                     Vdd
                                                      |14
                         Vdd-[10K]--+       +---------+--------+
                 1|\  2             |     13|                  |
 D0 (2)-----------+  >--------------+-------+ RB7/Data         |
                  |/                |       |                  |
     +5V-[10k]-+                    |       |                  |
               | 12 /|13            |       |    PIC 16C84     |
Busy (11)-------+--<  +--------------+       |     18 pin       |
                    \|                      |    ZIF Socket    |
                          Vdd-[10k]--+      |                  |
                 3|\  4              |    12|                  |
  D1 (3)----------+  >---------------+------+ RB6/Clock        |
                  |/                        |                  |
                          Vpp-[10K]--+      |                  |
                 5|\  6              |     4|                  |
  D2 (4)----------+  >---------------+------+ -MCLR/Vpp        |
                  |/                        |                  |
                                            +---------+--------+
                                                      |5
                                           +5V       GND
                                            |
                                 +--[10K]---+
                                 |          |
                11|\  10         |      B |/ E
            +-----+  >----[10K]--+--------|     PNP
            |     |/                      |\ C
            |                               |
            |                               +---Vdd
            |                               |
            |                             [10K]
            |                               |
            |                              GND
            |
            |                              +12V
            |                               |
            |                    +--[10K]---+
            |                    |          |
            |    9|\  8          |      B |/ E
  D3 (5)----+-----+  >----[10K]--+--------|     PNP
                  |/                      |\ C
                                            |
                                            +---Vpp
 GND (19)------GND                          |
                                          [10K]
                                            |
                                           GND



>From http://www.man.ac.uk/~mbhstdj/piclinks.html
you can find your way to Topic. It's quite nice because
it's at the same time a proto board. Easy to do, if you
can get your hands on laser printer (or a photocopier)
and UV-stuff to do the PCB.

I tried serial a serial programmer at first, but it didn't
do a thing with my computer.

Ecco a lei.


Kimmo


'newbie question'
1998\01\23@224640 by Philip A. Bernard, MD
flavicon
face
Where would I find the instruction set for a particular PIC?

Thanks in advance,

Phil Bernard

1998\01\23@231216 by Greg Maki

flavicon
face
At 09:37 PM 1/23/98 -0600, you wrote:
>Where would I find the instruction set for a particular PIC?
>
>Thanks in advance,
>
>Phil Bernard
>
>
Phil,

You can download the data sheet from Microchip's Web page :

http://www.microchip.com/10/Datasheet/PICmicros/index.htm

Kind regards,

Greg Maki

1998\01\28@110502 by Andrew Hall

flavicon
picon face
Hi,

Would somebody help a newbie please ?

I'm  experimenting with the 16C84 by using  the simulator built into
MPLAB version 3.09.02.
I want to experiment with the PCL and PCLATH registers and program
memory paging, so I ran the following (simplified) code expecting it to
fail:

       goto  too_far ; Shouldn't work ?


       org 0x100
too_far ; PCL will contain 0

       nop

When I ran the simulation I was surprised to see the "goto" jump to the
memory address  0x100 even though PCLATH contained zero :( I had
expected it to end up at address 0x0 ! In the register display PCL
contained 0 !!

What am I doing wrong  ? Have I misunderstood something about the 84's
architecture or simulator ?

Any help gratefully received,


Many thanks,



--
Andy

1998\01\28@203628 by TONY NIXON 54964

flavicon
picon face
>What am I doing wrong  ? Have I misunderstood something about the 84's
>architecture or simulator ?

You are misunderstanding the use of the PCLATH register when a GOTO
instruction is used.

With the C84 and F84, the PCLATH has no effect on GOTO or CALL
instructions. The entire address for these are contained within the
instruction itself.

If you are really stuck with addressing check out the web site below.


Regards

Tony

For the beginner....
PicNPoke Multimedia 16F84 Simulator Assembler, and Tutorial.
Now with PicNPlay circuit simulator.
Plus PicNPost animated Addressing Tutor.

http://www.dontronics.com/picnpoke.html

1998\01\28@203714 by Brian Schousek

picon face
Andy- Although there are probably by now several answers to your question
waiting to show up on my end, here is my explanation:

Check the datasheet description of the GOTO mnemonic. There you will find
that 11 bits of destination address are mapped into the machine language
instruction (same goes for the CALL mnemonic.) The range for the Program
Counter (PC) is of course 13 bits. Therefore in order to address the full
program memory range the upper two bits are provided in the PCLATH register.
Your address of 0x100 contains 9 bits of information, therefore no
additional PCLATH information is needed. In fact, 2^11 = 2048 = 0x800 and
the '84 has no memory above 0x3ff so for call and goto instructions you
won't have to use PCLATH at all.

So why is there a PCLATH register at all???? There are a couple of
explanations. One is to provide future expandability in the 16X8X line. The
other is for mnemonics which do not include 11 bits of operand information.
The prime example is for computed gotos, i.e. tables. The ADDWF mnemonic
includes only 8 bits of operand information, so in order to provide for
cases where a table will lie above the 8 bit boundary (your example of 0x100
for example) the PCLATH information becomes useful.

Refer to Figure 4-8 in the 16f84 datasheet for pictorial evidence of this
rant.

Brian

{Original Message removed}

1998\01\28@203717 by Andrew Warren
face
flavicon
face
Andrew Hall <RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU> wrote:

> I ran the following (simplified) code expecting it to fail:
>
>         goto  too_far ; Shouldn't work ?
>
>         org 0x100
> too_far ; PCL will contain 0
>
>         nop
>
> When I ran the simulation I was surprised to see the "goto" jump to
> the memory address  0x100 even though PCLATH contained zero :( I had
> expected it to end up at address 0x0 ! In the register display PCL
> contained 0 !!
>
> What am I doing wrong  ? Have I misunderstood something about the
> 84's architecture or simulator ?

Andy:

You've misunderstood how the GOTO command encodes the destination
address.  If you check the "PCLATH" section of the data book again,
you'll see that the GOTO command can directly jump to ANY location in
the 16C84's program space... Manipulation of the PCLATH register for
GOTOs isn't necessary unless you're using parts with more than 2K of
program memory.

On the 16C84, you only need to use PCLATH when you're DIRECTLY
modifying the PCL register (by executing a "MOVWF PCL" or "ADDWF
PCL" or whatever).

-Andy

=== Andrew Warren - RemoveMEfastfwdspam_OUTspamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499


'Newbie question'
1998\05\29@164437 by philb
flavicon
face
Here goes.

I'd like to program a 16C54 and I'm not sure I'm getting it to run
correctly.  I have a lot of assumptions but I'll try to be detailed:

I wrote this just to see if I could get an output and assembled it with
SPASM:
; PIC PROJECT: "squarewave
; Written     May 28, 1998
; last revision 5/28/98

               DEVICE  PIC16C54,HS_OSC,WDT_OFF,PROTECT_OFF
               RESET   Start           ;Set reset vector to address at Start
                                       ;(PIC will jump to this when reset)

               org     8               ;Start of available RAM

count0          DS      1               ;Assign labels to registers 08h
& 09h

               org     0               ;Start of code space

               clr     Count0
               clr     Count1

Start           mov     !RA,#00000001b  ;Set data direction register for port A
                                       ;(make bit 0 an input)
               mov     !RB,#10000000b  ; make bit 7 an output
;
;
; make outpin pin hi
;
begin           mov RB, #10000000b      ;RB.7 is output pin
;       pause for a certain period of time
               clr count0
:waitloop5      djnz count0,  :waitloop5 ; waiting loop
               mov RB, #00000000b      ;rb.7 low
;       pause for a certain period of time
               clr count0
:waitloop6      djnz count0,  :waitloop6 ; waiting loop
;restart
               jmp begin       ;endless loop
;end
It appears to work okay with psim.
I programmed a PICSTART plus using MPLAB and it supposedly works.

I hooked Vdd to 5v along with /reset.
I hooked Vss to ground.
I hooked up OSC1 and OSC2 to a DIP package 4mhz crystal.

But I get no output from portB.7 (or any other)

Any advice?  Thanks in advance,

Phil Bernard

1998\05\30@153602 by Michael Ghormley

flavicon
face
Philip A. Bernard wrote:

<SNIP>

> I hooked up OSC1 and OSC2 to a DIP package 4mhz crystal.
> But I get no output from portB.7 (or any other)

Crystals usually don't come in a DIP package.  Could it be that you have
a crystal oscillator instead?  If so, then hook up its output to the OSC1
pin (the pin number depends on the PIC package), and leave OSC2 open.

If you are using a crystal, then you didn't mention the caps to ground.
I usually hang a couple of 22pF caps from each pin of the crystal to
ground.  Of course, if the crystal is series resonant, then another setup
is required.

Look at pages 33 & 34 of the PIC16C5X datasheet to make sure that you
have a good clock.

Michael

REMOVE THE .NS (NO SPAM) FROM MY ADDRESS TO REPLY
*************************************************************************When th
e way of the Tao is forgotten, kindness and ethics must be taught.
Men must learn to pretend to be wise and good.  --  Lao Tzu
*************************************************************************


'Newbie Question'
1998\06\24@072250 by Graeme Dunbar
flavicon
face
I have never used a PIC before and I want to play with one without
spending very much money. Until now I have ignored them - I use
the 68HC11 - but the newer 12C5xx 8-pin devices caught my eye.

Is there an up to date FAQ? The most recent one I found was 1995.

Can anyone recommend a good introductory book - or a web based
tutorial?

What do I need to get started? If I can get away with it I would like
to make my own serial programmer and download the software. I found a
few circuit designs on the web and they look very similar. Should I
be wary of the ones that derive the programming voltage from the
PC port?

Should I consider making a parallel programmer to handle other
versions of the PIC?

I understand I can find the software I need for a PC on Microchip's
site. Is there anything else I need?

Sorry for asking obvious questions. All help is welcome. Thanks.



       Regards,
           Graeme

------------------------------------------------------------
Graeme Dunbar
School of Electronic and Electrical Engineering
The Robert Gordon University
Schoolhill, Aberdeen AB10 1FR, Scotland, U.K.
Tel. +44 1224 262415
Fax  +44 1224 262444
email  RemoveMEg.r.a.dunbarTakeThisOuTspamspamrgu.ac.uk
------------------------------------------------------------


'newbie question'
1998\08\08@133725 by ghfkj D hum
picon face
I about to get started playing with the pic and wondered the best way to
hook an in -system programmer to the chip? I'll be using the '84. Is
there any trick to it?

_____________________________________________________________________
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
Or call Juno at (800) 654-JUNO [654-5866]

1998\08\19@102350 by Germán Gentile

flavicon
face
Hello people, i'm have experience with 68HC11 and i have developed a app
with a hotachi 16x2 LCD, a 4x3 keypad , a RS485 interface and a 1 wire
interface. My question is : Is possible to develop a app with same features
on a 16F84? if don't qht other member of the Pic family is best size ready ?
i want to low actually cost so i want he minor additional hardare. Sorry but
i don't know nothing at all of PIc and i'm making a choice about motorola or
microchip. Any comment be great!!! thanks a lot.

Germ‡n Gentile

1998\08\21@144752 by Joshua M. Free

flavicon
face
Hello,
I've been following this list for about a week now and have decided to
take my first steps in becoming a pic programmer. I've started with the
pic16c715 as my first chip and I've purchased pcm, an inexpensive pic
c cross-compiler for dos.

I have already gotten stuck on my first program for the pic :(
I'm attempting to make two lights blink off and on forever. Here's
my short c program:

#include <16c715.h>
#use delay(clock=20000000)

main() {
   while(TRUE) {
       output_high(PIN_A2);     /* Physical Pin 1     */
       delay_ms(1000);          /* Wait 1 second      */
       output_low(PIN_A2);      /* Turn 1st bulb off  */
       output_high(PIN_A3);     /* Physical Pin 2     */
       delay_ms(1000);          /* Wait 1 second      */
       output_low(PIN_A3);      /* Turn 2nd build off */
   }
}

Using a voltmeter I can see that there isn't any juice coming out of
pins 1 or 2. Any help would be greatly appreciated :)

--
Joshua M. Free  <EraseMEjoshspamspamspamBeGoneeboai.org>  (JMF30)  http://www.eboai.org/~josh/
Art washes away from the soul the dust of everyday life - Pablo Picasso

1998\08\21@145206 by David VanHorn

flavicon
face
>}
>
>Using a voltmeter I can see that there isn't any juice coming out of
>pins 1 or 2. Any help would be greatly appreciated :)


I don't do C, but shouldn't you have some sort of chip setup code that
defines those pins as outputs, and maybe sets up a timer or something??

The frequency of the crystal also enters into it, else how to know when N
seconds have passed? All the chip knows is xtal clocks, which don't have a
finite relationship to realtime.

1998\08\21@152105 by Joshua M. Free

flavicon
face
On Fri, Aug 21, 1998 at 01:42:35PM -0500, David VanHorn wrote:
> I don't do C, but shouldn't you have some sort of chip setup code that
> defines those pins as outputs, and maybe sets up a timer or something??

I *believe* the output_high() and output_low() functions handle this.

> The frequency of the crystal also enters into it, else how to know when N
> seconds have passed? All the chip knows is xtal clocks, which don't have a
> finite relationship to realtime.

This is also all handled by the c compiler. The '#use delay(20000000)' tells
the compiler that the pic operates at 20MHz. Again, I *believe* the timing
issues are handled by the delay_ms() function.

Since you don't do C, could you give me an example how you accomplish this
task in assembly then? Thanks again for your help :)

--
Joshua M. Free  <RemoveMEjoshKILLspamspameboai.org>  (JMF30)  http://www.eboai.org/~josh/
Art washes away from the soul the dust of everyday life - Pablo Picasso

1998\08\21@152634 by Matt Bonner

flavicon
face
David VanHorn wrote:
>
> I don't do C, but shouldn't you have some sort of chip setup code that
> defines those pins as outputs, and maybe sets up a timer or something??
>
> The frequency of the crystal also enters into it, else how to know when N
> seconds have passed? All the chip knows is xtal clocks, which don't have a
> finite relationship to realtime.

David,
The 2 issues you raise are likely being handled by the following lines
in Joshua's code:
 #include <16c715.h>
 #use delay(clock=20000000)

Joshua,
I don't know the PCM compiler, but your code looks OK (if my comments
above to David are correct).  Can you describe your hardware?

--Matt

1998\08\21@154046 by Joshua M. Free

flavicon
face
On Fri, Aug 21, 1998 at 01:24:51PM -0600, Matt Bonner wrote:
> I don't know the PCM compiler, but your code looks OK (if my comments
> above to David are correct).  Can you describe your hardware?

I have the pic16c715 on a breadboard. +5V is connected to pin 14 and
ground is connected to pin 5. Pin 1 on the chip goes to a small round
bulb. The other end of the bulb is connected to ground. Pin 2 on the
chip goes to the second bulb. The other end of the bulb goes to the ground.

I've done simple sanity checks like removing the chip and connecting
the +5V that was going to pin 14 directly to both of the wires that would
connect to pins 2 and 3 to make sure the circuits complete.

--
Joshua M. Free  <joshSTOPspamspamspam_OUTeboai.org>  (JMF30)  http://www.eboai.org/~josh/
Art washes away from the soul the dust of everyday life - Pablo Picasso

1998\08\21@155138 by Ricardo Seixas

picon face
At 15:38 21/08/98 -0400, you wrote:
>On Fri, Aug 21, 1998 at 01:24:51PM -0600, Matt Bonner wrote:
>> I don't know the PCM compiler, but your code looks OK (if my comments
>> above to David are correct).  Can you describe your hardware?
>
>I have the pic16c715 on a breadboard. +5V is connected to pin 14 and
>ground is connected to pin 5. Pin 1 on the chip goes to a small round
>bulb. The other end of the bulb is connected to ground. Pin 2 on the
>chip goes to the second bulb. The other end of the bulb goes to the ground.
>
>I've done simple sanity checks like removing the chip and connecting
>the +5V that was going to pin 14 directly to both of the wires that would
>connect to pins 2 and 3 to make sure the circuits complete.

Is MCLR (pin4) connected to VCC ?



Ricardo Seixas

1998\08\21@155337 by Ricardo Seixas

picon face
At 14:35 21/08/98 -0400, you wrote:
>Hello,
>I've been following this list for about a week now and have decided to
>take my first steps in becoming a pic programmer. I've started with the
>pic16c715 as my first chip and I've purchased pcm, an inexpensive pic
>c cross-compiler for dos.
>
>I have already gotten stuck on my first program for the pic :(
>I'm attempting to make two lights blink off and on forever. Here's
>my short c program:
>
>#include <16c715.h>
>#use delay(clock=20000000)

#use standard_io(A)



Ricardo Seixas


1998\08\21@155539 by David VanHorn

flavicon
face
>Since you don't do C, could you give me an example how you accomplish this
>task in assembly then? Thanks again for your help :)


It sounds more horrible than it is :)

I sit down with the data book, and figure out how to initialize all the
on-chip peripherals for what I want to do. This includes turning off any
that I'm not using, enabling and diabling interrupts, etc. That all lives in
INIT.ASM (my convention)

Then I'd look at the xtal freq, and figure an appropriate reload value for a
timer. I might want to use the timer for lots of things, so I often set it
for a 1mS interrupt, and let the interrupt code decrement delays stored in
registers or SRAM.

The absolute minimum would be to set those pins on port X to outputs, and to
set a timer to divide the xtal by a large number. For this example, larger
is better.

The hard part is working out the correct timer and reload values WRT the
specific timer implementation on your chip.

Here's the pseudocode for it.

Start:  load temp,$01
          out porta,temp
          load delay,reload

Wait1:
          and delay,delay
          brnz Wait1

          load temp,$00
          out porta,temp
          load delay,reload

Wait2:
           and delay,delay
           brnz Wait2

           jmp Start


Note that once delay gets decremented to zero, TIMER_ISR leaves it alone.


TIMER_ISR:

          and delay,delay
          brz  Timer_otherstuff
          dec timer

Timer_otherstuff:

           ;whatever else needs doing

           reti

1998\08\21@155750 by David VanHorn

flavicon
face
>I have the pic16c715 on a breadboard. +5V is connected to pin 14 and
>ground is connected to pin 5. Pin 1 on the chip goes to a small round
>bulb. The other end of the bulb is connected to ground. Pin 2 on the
>chip goes to the second bulb. The other end of the bulb goes to the ground.


BULB????  a microcontroller output is typically good for about 20mA of
current.
an LED would be a good idea here, with about a 100 ohm series resistor.

1998\08\21@160801 by Quentin

flavicon
face
Matt Bonner wrote:
>
> David VanHorn wrote:
> >
> > I don't do C, but shouldn't you have some sort of chip setup code that
> > defines those pins as outputs, and maybe sets up a timer or something??
> >
> > The frequency of the crystal also enters into it, else how to know when N
> > seconds have passed? All the chip knows is xtal clocks, which don't have a
> > finite relationship to realtime.
>
> David,
> The 2 issues you raise are likely being handled by the following lines
> in Joshua's code:
>   #include <16c715.h>
>   #use delay(clock=20000000)
>
What David is refering to is the ASM "TRIS" command. It is used to setup
the I/O pins whether it is used as output or input. The header file does
not do this for you, it only points to the Tris register.
> Joshua,
> I don't know the PCM compiler, but your code looks OK (if my comments
> above to David are correct).  Can you describe your hardware?
>
> --Matt
Joshua asked for the ASM version for his proggy. Here is my feeble attempt
(the way I understand it. Note, I also don't use C):

list    P=16C715
include <16C715.h>

LED1    EQU     0       ;PORTA bit 0
LED2    EQU     1       ;PORTA bit 1

       org     0
       movlw   0x00    ;setup PORTA to be output
       TRIS    PORTA   ;or "CLRF TRISA" to replace both lines used with
               ;header
file

       CLRF    PORTA   ;reset PORTA

START
       BSF     PORTA,LED1      ;Switch on LED1
       CALL    DELAY   ;CALL DELAY Subroutine (not included here)
       BCF     PORTA,LED1      ;LED1 off
       NOP             ;Not always needed, just good housekeeping
       NOP
       BSF     PORTA,LED2
       CALL    DELAY
       BCF     PORTA,LED2
       GOTO    START

;Subroutines
;Subs go here

end

1998\08\21@161013 by Joshua M. Free

flavicon
face
On Fri, Aug 21, 1998 at 04:46:27PM -0300, Ricardo Seixas wrote:
> >I've done simple sanity checks like removing the chip and connecting
> >the +5V that was going to pin 14 directly to both of the wires that would
> >connect to pins 2 and 3 to make sure the circuits complete.
>
> Is MCLR (pin4) connected to VCC ?

VCC? Looking at my documentation I can't find a VCC.

Here's the pin layouts:
RA2/AN2       -> 1
RA3/AN3/Vref  -> 2
RA4/T0CKI     -> 3
MCLR/Vpp      -> 4
Vss           -> 5
RB0/INT       -> 6
RB1           -> 7
RB2           -> 8
RB3           -> 9
RA1/AN1       -> 18
RA0/AN0       -> 17
OSC1/CLKIN    -> 16
OSC2/CLKOUT   -> 15
Vdd           -> 14
RB7           -> 13
RB6           -> 12
RB5           -> 11
RB4           -> 10

--
Joshua M. Free  <spamBeGonejoshSTOPspamspamEraseMEeboai.org>  (JMF30)  http://www.eboai.org/~josh/
Art washes away from the soul the dust of everyday life - Pablo Picasso

1998\08\21@164353 by Chip Weller

flavicon
face
Joshua M. Free wrote:


{Quote hidden}

Some simple general purpose sanity tests:
a) Make sure the oscillator oscillates.
b) Make sure /MCLR is pulled to +5.
c) Test the output pins using a 10K resistor pulled up to +5 (Vcc or Vdd
depending on naming convention) and then down to 0V (GND or Vss). If you
can pull the pin voltage using this resistor then the tristate register
is not set correctly. Oppositely input pins you should be able to pull
to either +5 or 0V.
d) Make sure all output loads are reasonable current levels, it is best
to keep below 20mA on any pin. Testing using simple high value resistors
(10K for example) instead of the real load to make sure the logic is
working.

Have fun.

Chip Weller.

1998\08\21@165340 by Matt Bonner

flavicon
face
Joshua M. Free wrote:
>
> > Is MCLR (pin4) connected to VCC ?
>
> VCC? Looking at my documentation I can't find a VCC.

TTL terminology (Vcollector-collector).  Connect MCLR (if it's not) to
Vdd (Vdrain-drain).  This and David VanHorn's comment about LEDs and
current limiting resistors could solve your problem (although I would
suggest 220 or 330 ohms instead of 100).  If you can measure a 1 second
pulse *without* the "bulbs" connected, the bulbs are your problem.

--Matt

1998\08\21@175706 by Matt Bonner

flavicon
face
Martin Green wrote:
>
>      Matt, David and Joshua. There is *nothing* in the header that defines
>      the port direction to allow using them as outputs. Since all ports
>      start up as inputs, writing values to them will have no effect. The
>      #include statement only defines *where* the ports are, not how they
>      are set up.
Mea culpa.  I wrote my headers, macros, and initialisation library files
for my ByteCraft compiler a *long* time ago.  I haven't used a "tris"
since.

--Matt

1998\08\21@205230 by Germán Gentile

flavicon
face
Vcc = + 5 Volts. I'm also don't remember acronyms!!! ;)


{Quote hidden}

1998\08\22@061844 by Peter L. Peres

picon face
> VCC? Looking at my documentation I can't find a VCC.

In CMOS parlance:

Vss = Vcc = + a few volts
Vdd = GND = gnd
Vee = -Vcc = - a few volts

Vee is seldomly used (example: CMOS4051)

ss = Source voltage (as in MOSFET Source)
dd = Drain voltage (as in MOSFET Drain)
ee = ?? but should be substrate/bulk/epitaxial layer or something like that

hope this helps,

Peter

1998\08\22@061900 by Peter L. Peres

picon face
On Fri, 21 Aug 1998, Joshua M. Free wrote:

> On Fri, Aug 21, 1998 at 01:24:51PM -0600, Matt Bonner wrote:
> > I don't know the PCM compiler, but your code looks OK (if my comments
> > above to David are correct).  Can you describe your hardware?
>
> I have the pic16c715 on a breadboard. +5V is connected to pin 14 and
> ground is connected to pin 5. Pin 1 on the chip goes to a small round
> bulb. The other end of the bulb is connected to ground. Pin 2 on the
> chip goes to the second bulb. The other end of the bulb goes to the ground.
>
> I've done simple sanity checks like removing the chip and connecting
> the +5V that was going to pin 14 directly to both of the wires that would
> connect to pins 2 and 3 to make sure the circuits complete.

Ahh, five things:

1. The MCLR pin should be connected to +Vcc either directly or through a
4k7-39k resistor (4k7 is good).

2. There is no mention of an Xtal in your description. You need to connect
a crystal between Xin and Xout and a small, say 15 pF, capacitor from each
end of the crystal to ground too. You also need a decoupling capacitor
directly at the PIC pins. A 20 MHz Xtal is not such a good idea on a
bread-board imho. 4.000 MHz or 3.57 MHz is much saner. Change the use
delay() statement accordingly.

For more hardware details, download the PDF data sheet from Microchip, and
print the relevant circuit's page for reference, or obtain a Microchip
data book.

3. Small bulbs are bulbs, and thus require up to 3x nominal current when
cold (as in not lit). A 20 mA bulb may well exist, but it would draw more
to get lit. The PIC may not be able to source this current. LEDs are a
better choice. Replace each bulb with a 20 mA LED and a resistor of 220
ohms for now. Cathodes go to GND.

4. Some PICs have a startup problem if the power is not applied with a
clean and fast enough slope. The cure is a brown-out protector or an
external reset generator chip, or a PIC with all this inside (not your
option for now imho). For a test circuit the cure may be a reset button
that temporarily shorts MCLR to GND when pushed. MCLR must be connected to
Vcc through a resistor (4k7 is ok).

5. The PIC is a CMOS part, and ALL of its unused inputs must be tied HIGH
or LOW. Since you are tinkering, invest a few cents and pull all unused
I/O pins to GND using *resistors* of 470 ohms or so. This should prevent
accidents where you program a grounded pin as output and drive it. You can
re-use the resistors to drive 2 mA LEDs directly later, or as input
switch pull-ups or pull-downs ;)

here are my $0.05, hope this helps,

Peter

1998\08\22@114749 by bowman

flavicon
face
Peter L. Peres wrote:
>
> In CMOS parlance:
>
> Vss = Vcc = + a few volts
> Vdd = GND = gnd
> Vee = -Vcc = - a few volts

In National Semiconductor parlance for the CD4051BM,
" For example, if Vdd=5V, Vss=0V and Vee=-5V, analog signals from -5V to
+5V can be controlled by digital inputs of 0-5 V.

For historical reasons, the source and drain nomenclature refers to
electron flow. Vdd corresponds to Vcc. Vss is at a correspondingly lower
level.

again, with the National CMOS databook in front of me, the CD4xxx family
suggests 3 to 15V for the supply voltage (Vdd).


put 15V on Vss, 0V on Vdd, call Digikey, order new parts.

1998\08\24@100441 by Anthony Wilson

picon face
Could you show the ASM code for your delay routine?

1998\08\24@120612 by Matt Bonner

flavicon
face
Peter L. Peres wrote:
>
> In CMOS parlance:
>
> Vss = Vcc = + a few volts
> Vdd = GND = gnd
> Vee = -Vcc = - a few volts
>
> Vee is seldomly used (example: CMOS4051)
>
> ss = Source voltage (as in MOSFET Source)
> dd = Drain voltage (as in MOSFET Drain)
> ee = ?? but should be substrate/bulk/epitaxial layer or something like that
>
Vee -> Vemitter-emitter.  Anybody remember ECL (Emitter Coupled Logic)?
It was used in the "old days" for high-speed applications.  I can't
remember the voltage supplies required - but I believe Vee was -5.2V and
VCC was typically ground.

--Matt

1998\08\25@044609 by

flavicon
face
{Quote hidden}

The old days?? Ecl and it's cousin Pecl (positive emitter coupled logic) are
still very much alive.  It is used in most of our products.  There aren't
many choices when you are working at 2.4Gbits/s or higher!!

Mike Rigby-Jones
spamBeGonemrjonesspamKILLspamnortel.co.uk

1998\08\26@120617 by jimmy nigele

picon face
hello
I'm new to pics and designing my first project "pulse counter".
can anybody give me a hint how I can count a pulse

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

1998\08\27@021427 by Norayr S. Elmayan

flavicon
You may use any of the following methods:

a)      use tmr0 to increment on external pulse on RA4.
b)      test your port to detect a rising edge or fulling edge
c)      use interrupts to detect a rising edge or state change

Read option register configuration bits to find out how to set TMR0 with
external counter.

More later.

Norayr


'newbie question'
1999\05\16@113511 by bmohnsen
picon face
What is the difference between:
PIC
Programming parallel ports
Basic Stamps

Bonnie

1999\05\16@154434 by Tim Hamel

picon face
Woohoo! Finally ANOTHER question I can answer =)

PIC = Peripheral Interface Controller (is that it?)  The BEST micro I've ever
used (well, it's the only I've ever used.  I'd give a definition, but I'm
scared of the future criticism <g>  Check out http://www.microchip.com

Programming Parallel Ports (?) =  Uhh....not sure about the specifics on this
one.

Basic Stamps =  These are the little (not so little anymore with SX versions)
guys that make robotics/applications easier.  As opposed to programming the
PIC with Assembler, you program Stamps with another form of BASIC.
BASICally, it's a single-board computer (aren't most MCU's classified as
this?) utilizing the PIC.


I apologize for my over-use of parenthesis <g>

Tim H.


In a message dated 5/16/99 8:35:30 AM Pacific Daylight Time,
.....bmohnsenspam_OUTspamearthlink.net writes:

> What is the difference between:
>  PIC
>  Programming parallel ports
>  Basic Stamps
>
>  Bonnie

1999\05\16@185105 by Larry Fostano

picon face
Bonnie I have  a parallel port pic programmer,bought as a kit threw kisrus.


'Newbie question'
1999\12\23@051543 by Steve George
flavicon
face
part 0 845 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2>Hi there, I've been gearing up to start learning
PIC's. I really prefer to use a C compiler of some sort. Are there any available
in the hobbiest price range? I see that Microchip has a trial version on their
site but I couldn't find any pricing information for a full
version.</FONT></DIV>
<DIV><FONT color=#000000 size=2>Any help would be greatly appreciated
:)</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Steve
George</FONT></DIV></BODY></HTML>

</x-html>

1999\12\23@112242 by Giles L. Honeycutt

flavicon
face
Hey, what do you consider hobby pricing?
Well anyway, we bought a C compiler for $99.00 or close to that.  It is from
Custom Computer Services.
Now for better pricing:  You can also download their demo compiler that
simply does not contain all the header files for all the pics.  Actually, do
download the demo, because for some reason the paid for version does not
have the help file that the demo has.

I would recommend you play with the ASM before you try the C, as a lot of
times we revert to debugging by looking at the code the compiler built.
Don't worry, the ASM is not hard.  And lots of people can help you with it.

Happy Holidays,
Giles


{Original Message removed}

1999\12\23@113532 by Dan Creagan

flavicon
face
part 0 16 bytes
</x-html>

1999\12\23@125627 by Steve George

flavicon
face
part 0 4929 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
<STYLE></STYLE>

</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2>Sound reasonable. I'll give it a try. I actually
purchased the YAP package with the book. Do you think this is a good starting
direction?</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Steve
George</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">
   <DIV><FONT face=Arial size=2><B>{Original Message removed}


'Newbie Question'
2000\01\08@083130 by jkitchen
picon face
I have just successfully programmed my first PIC (a P16F84) and had
unexpected results  -- code protection is enabled when I had wanted it
disabled.  As I understand it, bit 4 of the CONFIG word should be set (1)
for code protect disabled.  I assembled the "lights" program using Charles
Manning's 1996 P84 assembler, and programmed the PIC using Bojan Dobaj's
PRO Light (P16PROL) software.  When running Prol Light, it indicates code
protect is ON.

What am I missing here?

(Yes, the P16F84 runs the lights program OK, making the LEDs flash as
expected.)

Marion

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