Searching \ for 'How do I get rcv232.src to run on 16C84?' 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/microchip/devices.htm?key=16C
Search entire site for: 'How do I get rcv232.src to run on 16C84?'.

Truncated match.
PICList Thread
'How do I get rcv232.src to run on 16C84?'
1998\04\24@204451 by Matthew

picon face
I have the "PIC 16CXX Applications Handbook" and I'm trying to run the
rvc232.src on a 16c84 and I can't get it to do anything.  I'm using
SPASM to compile it which I also purchased from Parallax.

I've made the code change for a 22k ohm resistor.  I've also marked out:

;reset   begin

Changed the pic16c54 too pic16c84

Compiled with:  SPASM rcv232.src /s

I've used two different programmers:

picstart 16B1 and the ITUtech programmer.  Both seem to program the pic.

Changed the cfg bits to XT, watchdog off

I'm using a 4MHz osc module rather then a crystal, same thing but
easier, going to OSC1 pin.

I've tried communicating with two different computers running the
Qbasic program in DOS.

The voltages are correct powering up the chip.  I've tried two
different pics.  I have 3 pic16f84's but neither of my programmers
support them.  How convenient, I just spent 80$ on the picstart
programmer.

The LED's seem to flash once when the circuit powers up but that seems
to be the end of it.  I've checked the osc with a scope on the osc1
pin and its good.

Any suggestions?  Please....

Would using a Parallax programmer make things go any easier?

Thanks

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

1998\04\25@001904 by Bill Kennedy

flavicon
face
rcv232.src may be a file that is included in rs232.src and may not be meant
to use by itself.  Hope this helps.
{Original Message removed}

1998\04\25@010034 by -Dossary %166.87.109.11%

flavicon
face
Bill Kennedy wrote:
>
> rcv232.src may be a file that is included in rs232.src and may not be meant
> to use by itself.  Hope this helps.
> {Original Message removed}

1998\04\25@015455 by Bill Cornutt

flavicon
face
????,

Sounds like this is your first PIC program.
Also sounds like you don't have a lot of expierence.
(not a flame, just a statement)

You didn't say you checked the voltage to the PIC.
If you didn't check the supply voltage and it turns
out to be the problem, then (as the little girl said
while eatting fondue) "if your bread falls of into
the pot, your a dodo head"?

So better check the PIC supply voltage just to cover yourself.

Now trouble shooting....

The oscilator oscialtes.  Any thing more than that you
don't know.

Do you have a signal on the input pin of the PIC?

Do you have anything on the output pin of the PIC?

I don't know what the PIC is susposted to do, but
why don't you try something very simple first.
And get a lot of information.

Just modify the program so that whatever the pic
sees on the input pin, it puts on the output pin.
Don't use interupts, or RTC or anything,
just if pin inis high, pin out is high, and
visaversa.  A real simple loop.

I would say to modify the program you have by adding
this simple program.  This way you keep all the assembler
stuff the same as in your 'real' program.

When you get this to work you should be able to see
what the big computer sends to the PIC echoed back
to the pc.  You may have to invert the signal in the pic,
but don't worry about this untill you see something
comming out of the pic that looks like what is going into
the pic.  Like I said, it may be inverted,

When that works, you know that the pic got the program
and is running it.  You know that the Pic gets a signal
in and can output a signal.

The next step will be to find some way to see what is
happing inside the PIC while the 'real' program is running.
Pick a place in the program and ask the question "am I
getting here?"  And then put something in the 'real' program
that will show you that you are getting there or not getting
there.  You mentioned the led, use it or use a spare pin on
the PIC as a indicator to show you if a part of the program
is ever reached.

This problem of not being able to see what is going on
in a program and being able to make little patches quickly
is why the otimers used ram and had a 'monitor' in with
the program when they debugged it.

You may have a simulator.  And that can be a big help.
But it is hard sometines to simulate real world i/o
using one.  But if you single step through the program
or use breakboints, you can verify that a lot of the
program is running correctly.

In fact, it would be a good idea if you have a simulator,
that you run test out the little routine I mentioned above
about just outputting what comes in.  And get it to work on the
simmulator first, before programming it into the pic.

This "it don't work" isn't going to cut it Slick.
Naturally it don't work.  That is why they pay programmers
the big bucks.  The secret is to enjoy finding out why
it don't work.  And the day will come when the first time
a program is tried, it runs, and you feel a little
disapointed because you were cheated out of the chalange
of debugging it.

All this comes from a guy that just spent a hour on a trival
little program and the problem was that I put my * before my /
when I started a comment.  But I found it!!!  after an hour!!!

Good luck.
Have fun.
Don't let it get to you.

Bill C.    spam_OUTbillTakeThisOuTspamcornutt.com


----------
{Quote hidden}

1998\04\26@015827 by Russell McMahon

picon face
Matthew

1.    If your programmer supports 16C84 you can (probably)
program 16F84s using the 16c84 setting with the protection
bit setting reversed (ie use "protected" when you want
"unprotected").

2     Is this the only program you have tried or the only
one that won't work?
If this is your first program it would be advisable to try a
VERY simple program that eg just flashes a LED first to show
that the basic system is working. A complex programme that
doesn't work can hide more fundamental problems.

3.    If the program is all working but the hardware is not
functioning then the following  MAY be your problem (but
Murphy says it probably won't be.)

I am unaware of the particular circuit you are using (what
is the app note number?) but many people on this list say
they have used RS232 straight into a PIC pin via a series
resistor and  have said that this worked for them and that
the PIC protection diodes "catch" any voltage overswing.
However, this method of input protection is not guaranteed
in the datasheet. Generating substrate current via the
protection diodes can conceivably cause unexpected results
and in my experience, it did.

I used a series input resistor for RS232 receive with a
16F84 and had endless problems due, as it turned out, to the
current into the protection diodes. This can be overcome by
either placing reverse schottky diodes (eg BAT85) to supply
and ground from the input pin or by splitting the input
resistor into 2 and using 2 silicon diodes from the midpoint
to ground and supply. Both schemes stop the protection
diodes conducting during normal use.


{Original Message removed}

1998\04\27@014433 by Matthew

picon face
---Russell McMahon <.....apptechKILLspamspam@spam@CLEAR.NET.NZ> wrote:

>I am unaware of the particular circuit you are using(what is the app
note number?) but many people on this list saythey have used RS232
straight into a PIC pin via a series resistor and  have said that this
worked for them and that the PIC protection diodes "catch" any voltage
overswing. However, this method of input protection is not guaranteed
in the datasheet. Generating substrate current via the protection
diodes can conceivably cause unexpected results and in my experience,
it did.

>I used a series input resistor for RS232 receive with a 16F84 and had
endless problems due, as it turned out, to the current into the
protection diodes. This can be overcome by either placing reverse
schottky diodes (eg BAT85) to supply and ground from the input pin or
by splitting the input resistor into 2 and using 2 silicon diodes from
the midpoint to ground and supply. Both schemes stop the protection
diodes conducting during normal use.

This was one of my problems.  I added a NPN transistor to convert and
invert the RS232 levels from +10/-10 to standard TTL levels.  My other
problem was the data origin had to be changed from 08h to 0Ch to
support the 16C84 instead of the 16C54 PIC.  Everything seems to be
working now.  By the way this Parallax PIC application note #2 from
there book.  The source code can be found in the pic_apps.zip
file(rcv232.src) on there ftp site.

Thanks for the help.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

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