i tried once more before i go to bed
but this time i write it with icprog
Walla! it's working man
except for RA4 column, there's something wrong
i'll deal with it soon as i woke up
You no whats the whole deal here is no one read all the post just parts And i did this on 4 chips if they could read the code they would know where led 9 goes and I didn't tell any one to use 10 k on any leds there 150 ohms the 10k goes to mclr to vdd the 1k drive the 3 transistors now Bill is right you can't put a led on PORTA,4 it can only sink power I should of look back a what did when I made this work on a 16f628a But I can't I lost my harddrive
on the computer I use for this. You use PORTA,2 for led 9
Code:
Output2:
; --- Top Layer ---
clrf PORTA ; clear port B
movfw Layer1 ; move layer1 to W
movwf PORTB ; put W onto PortC
btfsc Layer4,7 ; see if LED 9 should be on
[COLOR="Red"] bsf PORTA,2 ; turn on LED 9[/COLOR]
Oh...is there any difference in 16f628 and 16f628a. I am using 16f628A. is that the problem, then what is the change the circuit and program for 16f628A?
i have done the circuit like only. but my doubt is on my pic. how can i check my pic is working. because all the other wiring is correct (i checked). is the follwing voltages are correct?
after the 10k - 1.54v(is this resistor required)
after the diode - 0.99v
after every 1k - 0.03v(i don't think so this is enough for to glow an LED)
Cool it is working....my doubt is right. my pic is not working. i tried with winpic it is working except RA4 and RB2...Like the above reply do i need to reprogram it....
It is really great to look at the working LED...Thanks a bunch be80be
Yes, mine too...
all LED working now after i move the 9th LED to RA2, thanks to you.
and now i'm about to learn to give some modification to the HEX,
i'm telling you be80be, i'm gonna spend your time with a lot of question,
it's your fault for being a master of it, LOL.
Thanks...
well...it won't happen without your help,
be80be,
i'd like to use switches at unused portA for some command
let's say...
i wanna call label 0008 with switch at RA0,
label 0009 with switch at RA1 and label 0010 with switch at RA3
how could i do that
could i just add this to the hex
BTFSS PORTA , 00
CALL Label_0008
BTFSS PORTA , 01
CALL Label_0009
BTFSS PORTA , 03
CALL Label_0010
or is there anything else to change/add?
thank you in advanced
You added it to asm and rebuild the hex that code doesn't do any thing but check them. And you need to debonuce the switch here look at this
Code:
LookingForDown:
clrw ; assume it's not, so clear
btfss PORTA,3 ; wait for switch to go low
incf Counter,w ; if it's low, bump the counter
movwf Counter ; store either the 0 or incremented value
goto EndDebounce
LookingForUp:
clrw ; assume it's not, so clear
btfsc PORTA,3 ; wait for switch to go low
incf Counter,w
movwf Counter
You added it to asm and rebuild the hex that code doesn't do any thing but check them. And you need to debonuce the switch here look at this
Code:
LookingForDown:
clrw ; assume it's not, so clear
btfss PORTA,3 ; wait for switch to go low
incf Counter,w ; if it's low, bump the counter
movwf Counter ; store either the 0 or incremented value
goto EndDebounce
LookingForUp:
clrw ; assume it's not, so clear
btfsc PORTA,3 ; wait for switch to go low
incf Counter,w
movwf Counter
i tried that but sadly i couldn't make the hex file right with mplab
the hex file just filled with 3FFF
i've search through google to find asm to hex converter but i couldn't find good one
could anyone show me a simple programmer schematic that i could use with mplab cause i don't have cc to buy real prgrammer on the net