*EDIT* I actually just need to know the addresses of the ports and the bits cuz I cant find this info anywhere...a link or something would help (or you can just tell me)
Hi there anyone...lol.
Anyways, what I really need to know is what name/code corresponds to each pin in a 12f683 if my layout is gonna be like this. (1 = open (high) 0 = closed (low))
______
(1?) Power-> 1 -| |- 8 <-Ground (0?)
2 -| CHIP |- 7
(0) leftTrigger-> 3 -| |- 6 <-Right Trigger (0)
4 -|_____ |- 5
*idk what to do with the power (pin 1) and the Ground (pin 8). I know how to set the pins to in or out but I don't know how to show to what pin. Basically I'm not sure what name they would have in an asmembly program. The coding is probably going to be the hard also but first I need to know this...I need to know when/how to send a pulse to both right and left triggers (pins 3 & 6). I can do that with something like...
*my constants are wrong because I do not know how to set which pin for input output and stuff because I dont know what they are called. Basically...I want 1,0,0,0,0,0,0,0,0
*So...basically...the only one that is an input is the power (if it needs to be input?) then the rest are jsut output (to send the signals). What I ahve now is 02h for the 00000 (Idk what pins that is for tho!) and 00h (same thing). Just help me out...
;Our Constants
STATUS equ 03h ;Address of the STATUS register
TRISA equ 85h ;Address of the tristate register for port A
PORTA equ 05h ;Address of Port A
COUNT1 equ 08h ;First counter for our delay loops
COUNT2 equ 09h ;Second counter for our delay loops
Start movlw 02h ;send the signal by putting it
movwf PORTA ;into the w register and then on the port
;****the delay
call Delay
;****Delay finished, now turn signal off****
movlw 00h
movwf PORTA
call Delay
goto Start
;****Our subroutine
Delay
Loop1 decfsz COUNT1,1 ;This second loop keeps the signal
goto Loop1 ;turned off to
decfsz COUNT2,1 ;
goto Loop1 ;
return
;****End of the program****
end
lol...this is my first time ever programming anything...so help me out...