| Author |
Message |
Byron A Jeff
Guest
|
Posted:
Sat Dec 18, 2004 10:42 pm Post subject:
Re: pic16f77 acting goofy |
|
|
In article <vDZwd.55501$yf.19880@fe2.texas.rr.com>,
Anthony Fremont <spam@anywhere.com> wrote:
-
-"Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message
-> I wrote:
-> >There isn't, it's a perfectly valid (albeit confusing) construct or
-it
-> >would be documented as illegal in the datasheets. Back to back bit
-> >flipping on loaded output ports.......now that's another matter. ;-)
->
-> The 18F series at least allows you to avoid that "feature".
-
-I'm assuming that the 18F's read the port latch during RMW instead of
-the actual pin state, is that correct?
No. There is a separate latch output register that is not affected by RMW
instructions.
BAJ |
|
| Back to top |
|
 |
Guest
|
Posted:
Sat Dec 18, 2004 11:03 pm Post subject:
Re: pic16f77 acting goofy |
|
|
I've seen a much simpler conversion routine that others have written,
where you would decrement flag1 while incrementing a counter. This is
looped until flag1 hits zero and some if-statements keep track of the
ones, tens and hundreds placeholders. I thought since I'm only working
with a number up to 20, I could do the same conversion with a series of
logic statements using fewer instruction cycles. I think I
accomplished that (though maybe not by much) and hence the confusing
conversion routine you see.
What does the resolution for a program like this need to be? I don't
know, but my goal was to maximize it. Right now, trying to remember
off the top of my head, I'm somewhere in the microsec range. |
|
| Back to top |
|
 |
Spehro Pefhany
Guest
|
Posted:
Sat Dec 18, 2004 11:05 pm Post subject:
Re: pic16f77 acting goofy |
|
|
On Sat, 18 Dec 2004 17:18:19 GMT, the renowned "Anthony Fremont"
<spam@anywhere.com> wrote:
| Quote: |
"Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message
I wrote:
There isn't, it's a perfectly valid (albeit confusing) construct or
it
would be documented as illegal in the datasheets. Back to back bit
flipping on loaded output ports.......now that's another matter. ;-)
The 18F series at least allows you to avoid that "feature".
I'm assuming that the 18F's read the port latch during RMW instead of
the actual pin state, is that correct?
|
Yes, there's another SFR address (LATx) in addition to PORTx, that
behaves that way. So you can still have it the old way if you like.
| Quote: | I haven't started using them yet, but I just got Peatman's "new" book on
the 18F452. They look real nice, but a bit different from what I'm used
to. I started with an F84 and progressed to the F628. I'm anxious to
play with some F88's as well now, since I've never tinkered with an
internal ADC yet.
|
I've recently designed a couple of products with the 18F85xx series.
Pretty nice parts, but I think the next step up is to 32 bits.
| Quote: | I'm going to build up Peatman's circuit board, but Digikey is lacking
one of the parts in their kit so shipping is delayed until Jan or Feb
2005. I'm going to see if they will ship what they have and back order
the missing piece. I hope my Picall programmer will be able to install
the boot loader into the 18F452.
|
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com |
|
| Back to top |
|
 |
Guest
|
Posted:
Thu Dec 23, 2004 3:40 am Post subject:
Re: pic16f77 acting goofy |
|
|
Well, the problem is solved.
Noel was right. I hadn't properly initialized one of my variables
(dig1a). Everything's working fine now. Thanks to everone for the
insights and help. You're good people!
Merry Christmas,
Steve |
|
| Back to top |
|
 |
|
|
|
|