Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
williB said:it worked very very well
the program is a lot smaller now. lol
only three lines are needed ?
this is very cool.. 8) 8)
oh , yes i am outputting the code from the switch.. :wink:
williB said:well i coppied your stepper board Nigel,
after four hours all i have is a vibrating stepper motor.
lol i'm using a stepper made by Minebea Co., Ltd type 23KM-K379-G1
i am using the four flip flops from the programmer to drive four IFR-510 N channel mosfets set up like you have it & the diodes of course.
i havnt figured wether i should turn off one line before turning on the next
* sigh*
williB said:i found it... appendix c...
https://www.electro-tech-online.com/custompdfs/2004/09/33014g-1.pdf
it really helps when u have the user guide for mpasm
Delay movlw d'250' ;delay 250 ms (4 MHz clock)
movwf count1
d1 movlw 0xC7
movwf counta
movlw 0x01
movwf countb
Delay_0
decfsz counta, f
goto $+2
decfsz countb, f
goto Delay_0
decfsz count1 ,f
goto d1
retlw 0x00
end
williB said:Nigel or anyone ...what is $ +2 in this code ??
thanksExo said:williB said:Nigel or anyone ...what is $ +2 in this code ??
$ stands for the current address. So 'GOTO $+2' will jump 2 lines forward.
williB said:Nigel ,the veroboard you use .. i am not familiar with it..
what do you mean when you say cut the tracks..?
are the connections running vertically down the board ..??
techknow said:hello guys..after a long time without any post...i am back again..hehehe
i need a very simple asm code for the below:
when porta ..RA0,RA1,RA2 AND RA3 gets an 4bit binary value it should save on an variable(any variable) and it will call to a data tabe and the value should go to portb.
Example: when porta gets 0x03h it call datatable after saving it on an variable and port be shoud get out put as..b'00000100'
when porta gets 0x05h portbshould get as ..b'00010000'
like this it goes ...so can any one help me..
i need an very simple code..
bsf STATUS,RP0
movlw b'00000000'
movwf LEDTRIS
movlw b'00001111'
movwf trisa
bcf STATUS,RP0
clrf LEDPORT
Read
movwf porta
movf porta, f
movwf count
movf count, w
call Table
movwf LEDPORT
clrf count
goto Start
Table ADDWF PCL, f
retlw b'00000000'
retlw b'00000001'
retlw b'00000010'
retlw b'00000011'
retlw b'00000100'
retlw b'00000101'
retlw b'00000110'
retlw b'00000111'
retlw b'00001000'
retlw b'00001001'
retlw b'00001010'
retlw b'00001011'
retlw b'00001100'
retlw b'00001101'
return
end
techknow said:Code:bsf STATUS,RP0 movlw b'00000000' movwf LEDTRIS movlw b'00001111' movwf trisa bcf STATUS,RP0 clrf LEDPORT Read movf porta, w ;changed call Table movwf LEDPORT goto Start Table ANDLW b'00001111' ;added - ESSENTIAL! ADDWF PCL, f retlw b'00000000' retlw b'00000001' retlw b'00000010' retlw b'00000011' retlw b'00000100' retlw b'00000101' retlw b'00000110' retlw b'00000111' retlw b'00001000' retlw b'00001001' retlw b'00001010' retlw b'00001011' retlw b'00001100' retlw b'00001101' end
here the code i am using is this will work