newbie...


hi Gurus,
You all must be wond3(e)ring why I saluted with "Guru"s
As stated in subject line I am new to Embedded system, and
electronics. and for me, all of you are geneous than me. from each of
your hint, i am going to learn.
Yup, for your reference, I am B.E. IT from reputed COE in MS India. I
know C, C++ and Java with JSP and JScript.
My dream to work as system programmer, doesn't matter if its other
company of mine own. (Why am i working as maintainence programmer???)
But I really work in Embedded system at least as hobbyist.
Now I am starting with PIC 16F877A. I got a development board
(localized, not standard) and a ICSP(whats this?) programmer. I am
using proteus 7.0 and MPLAB.
on my board, there are 8 LEDs which are connected to PORTA and I am
desparatedlyyy wanted to blink one of those LED(so that i can proceed
to other things with confidence). but but but.... those are as good as
dead. I wrote a program for it. whn i simulate, it works fine. but
after writing on MCU it is showing nothing but dead LEDs.
Now I am stuck. I beg your request to help me out. Plz Plzzzzzzzzz
help me. I am stuck.....
FYR: my board schematic:
formatting link

Program which i used:
;16f877 a/d test routine
__config _LVP_OFF & _XT_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFF &
_BODEN_OFF
& _DEBUG_OFF
list p=16f877
include "p16f877a.inc"
; Start at the reset vector
org 0x000
goto Start
org 0x004
Interrupt
retfie
Start
bsf STATUS,RP0 ;bank 1
bcf STATUS,RP1
movlw H'00'
movwf TRISA ;portc [7-0] outputs
clrf ADCON1 ;left justified, all inputs a/d
bcf STATUS,RP0 ;bank 0
movlw B'01000001' ;Fosc/8 [7-6], A/D ch0 [5-3], a/d on
[0]
movwf ADCON0
Main
call ad_porta
goto Main
ad_porta
;wait for acquision time (20uS)
;(non-critical for this test)
bsf ADCON0,ADON ;Start A/D conversion
Wait
btfsc ADCON0,GO ;Wait for conversion to complete
goto Wait
movf ADRESH,W ;Write A/D result to PORTA
movwf PORTA ;LEDs
return
end
Reply to
Chinar G Kakutsey
Loading thread data ...
In Circuit Serial Programming
formatting link

I cannot find a link for the schematic on that page. I am assuming that the LEDs are pre-wired on the board with whatever resisters may be necessary to keep power disipation minimal.
Perhaps to simplify this test, it would be easier to ignore the A/D coverter output, and simply turn on some of the LEDs directly. That will prevent any confusion over what might be being fed into the A/D converter.
Reply to
Tim Harig

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.