Searching \ for '[PIC]:el cheapo 16F877 problem' 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=16F
Search entire site for: 'el cheapo 16F877 problem'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:el cheapo 16F877 problem'
2003\02\09@224705 by mr. man

picon face
Hi,
I bought Myke Predko's "Programming and Customizing
PIC Micro Microcontrollers." I'm using the El Cheapo
board, software and MPLAB 6.1. I tried the "ledon"
experiment and it worked with a 16F84A, then I tried a
16F877, it programmed and verified OK but when I put
it in the circuit the LED turned on and stayed on
regardless or input. I tried the home built version of
el cheapo and got the same results. I saw some posts
about Low Voltage Programming mode (LVP) and tried a
10K from RB3 to ground but got the same results.
Has anyone gotten the el cheapo to work with the
16F877?

Thank you,
Bill


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\09@232723 by Josh Koffman

flavicon
face
The 16f877 has a number of features the f84 doesn't. Have you read the
f877 datasheet? I don't know anything about the circuit or program
you're using, but it could be you are getting bitten by not turning off
a feature, such as ADC.

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.
       -Douglas Adams

"mr. man" wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2003\02\09@233137 by Jai Dhar

flavicon
face
Are you using an external oscillator? Keep in mind the f877 doesn't have a
built in oscillator.

Quoting "mr. man" <thirdratepunkspamKILLspamYAHOO.COM>:

{Quote hidden}

----------------------------------------
This mail sent through http://www.mywaterloo.ca

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\09@233144 by Jai Dhar

flavicon
face
Quoting Josh Koffman <listsjoshspamspam_OUT3MTMP.COM>:

> The 16f877 has a number of features the f84 doesn't. Have you read the
> f877 datasheet? I don't know anything about the circuit or program
> you're using, but it could be you are getting bitten by not turning off
> a feature, such as ADC.

True, you need to set the ADCON register on startup to enable/disable Port A
and E. If you are trying to use Port A and it's not working, try setting ADCON
first.

{Quote hidden}

----------------------------------------
This mail sent through http://www.mywaterloo.ca

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\10@113634 by Dave Dribin

flavicon
face
On Sun, Feb 09, 2003 at 11:30:52PM -0500, Jai Dhar wrote:
> Quoting Josh Koffman <RemoveMElistsjoshTakeThisOuTspam3MTMP.COM>:
>
> True, you need to set the ADCON register on startup to enable/disable Port A
> and E. If you are trying to use Port A and it's not working, try setting ADCON
> first.

Yes, this is a bug in Myke's book... ledon will not work as written.
You need to configure Port A as digital inputs:

       MOVLW   0x06            ; Configure Port A as digital inputs
       MOVWF   ADCON1 ^ 0x80   ;  .

I ripped my hair out until I read the datasheet.  It was a good
unexpected debugging exercise, but it's too bad the simplest of simple
programs in the book is wrong.  Not good for beginners. :) And this
error is not listed in the book's errata.

-Dave

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu>

2003\02\10@115052 by Rob Hamerling

flavicon
face
Dave,

Dave Dribin wrote:

> Yes, this is a bug in Myke's book...
...
> And this error is not listed in the book's errata.

Where can I find a list of errata, especially for the first
printing of this book?

Regards, Rob

--
Rob Hamerling, Vianen, NL phone +31-347-322822
homepage: http://www.robh.nl/

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu>

2003\02\10@121212 by Dave Dribin

flavicon
face
On Mon, Feb 10, 2003 at 05:49:55PM +0100, Rob Hamerling wrote:
> Where can I find a list of errata, especially for the first
> printing of this book?

The "official" site of the book is here:

 http://www.myke.com/pic-book.htm

But there's not really a lot there in terms of errata.

-Dave

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamTakeThisOuTmitvma.mit.edu>

2003\02\10@141153 by Rob Hamerling

flavicon
face
Hello Dave,

[about errata in Myke Predko's book]

Dave Dribin replied:
>
> The "official" site of the book is here:
>
>   http://www.myke.com/pic-book.htm
>
> But there's not really a lot there in terms of errata.

An understatement!
In July 2002 I sent Myke a list of the errors I found. But he
never published anything like this on his site, unlike his promise
near the bottom of on page XXII of this book!
For those who got a so called 'early print' like me, I have put my
(probably by far complete!) list of errata on my homepage.
See http://www.robh.nl/PICSOFT.HTM#predko

Regards, Rob.


--
Rob Hamerling, Vianen, NL phone +31-347-322822
homepage: http://www.robh.nl/

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam.....mitvma.mit.edu>

2003\02\10@213143 by Myke Predko

flavicon
face
Hi Bill,

Sorry about the problems.

As people noted, there is an issue with ledon - you have to write to ADCON1
to change PORTA from an analog input to digital I/O.

Here is the corrected application:

title  "ledon - Turn on a LED when a Button is Pressed"
;
;  This is the First Program to be Burned in and Run in a PIC.
;
;  The Program simply sets up Bit 0 of Port "A" to Output and then
;   Sets it Low when RA0 is pulled low.
;
;  Hardware Notes:
;   _MCLR is tied through a 4.7K Resistor to Vcc and PWRT is Enabled
;   A 220 Ohm Resistor and LED is attached to PORTB.0 and Vcc
;   A 10K pull up is connected to RA0 and it's state is passed to
;    RB0
;
;  Myke Predko
;  99.12.03
;  02.01.10 - Added Write to "ADCON1" to Put PORTA in Digital I/O
;              mode
;
 LIST R=DEC
ifdef __16F84
 INCLUDE "p16f84.inc"
endif
ifdef __16F877
 INCLUDE "p16f877.inc"
endif

;  Registers

ifdef __16F84
__CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON
else
__CONFIG _CP_OFF & _DEBUG_OFF & _XT_OSC & _PWRTE_ON  & _WDT_OFF & _LVP_OFF
& _WRT_ENABLE_ON & _BODEN_ON & _CPD_OFF
endif

;   __IDLOCS 0x01234

 PAGE
;  Mainline of ledon

org     0

 nop    ;  "nop" is Required for Emulators

 bsf    PORTB, 0               ;  Make the LED on PORTB.0 "off"

 bsf    STATUS, RP0            ;  Goto Bank 1 to set Port Direction
 bcf    TRISB ^ 0x080, 0       ;  Set RB0 to Output
ifdef __16F877
 movlw  7   ;  Make PortA Digital I/O for PIC16F877
 movwf  ADCON1 ^ 0x080
else
 nop    ;  Make sure Space required is always the same
 nop
endif
 bcf    STATUS, RP0            ;  Go back to Bank 0

Loop
 movf   PORTA, w  ;  Simply Transfer PORTA.0 to PORTB.0
 movwf  PORTB

 goto   Loop


end


Again, sorry about the hassles - if you have any more problems let me know.

Right now due to workload I am lurking and will reply to help out with
problems,

myke


{Original Message removed}

2003\02\12@154227 by mr. man

picon face
Hi,

Myke's updated file worked with the home built version
and the el cheapo board. Hooray!

Thank you,
Bill




__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

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