Aedolon
Just face it: sometimes nobody envies you. There has to be a bottom and that bottom is probaly you. // http://www.amazon.com/o/registry/VWZ93N4Y6XQT
Ik heb ene poging gedaan om een toerenteller in jal te maken omdat assembler nogal lang zou duren en zoveel tijd en zin heb ik niet...
en aangezien ik Jal niet ken (heb ff manual doorgelezen om te weten wat de syntax ongeveer is)
ik geef pulsen op RB0/INT maar als ik dat doe dan krijg ik een soort kortsluiting precies net alsof ik RB0 als output heb gezet en er 5V opzet...
ohja ik heb in de Hd447804 de pins allemaal op port C gezet zodat RB0 vrij is
edit: ik heb al pin_b0_direction = input toegevoegd, helpt niks
dit is de code:
include f877_4
include hd447804
include jdelay
include bin2bcd3
const byte totaalpass = 39
const byte myinitt0 = 56
var byte o_reg
var byte tellerL , tellerH
var byte totaalL , totaalH
var byte npass
var byte msd, osd, lsd, dig
procedure interrupt_handler is
pragma interrupt
bank_0
if intcon_intf then
intcon_intf = low
assembler
incf tellerL,f
btfsc status_z
incf tellerH,f
end assembler
end if
if intcon_t0if then
intcon_t0if = low
tmr0 = myinitt0
asm decf npass,f
if status_z then
totaalL = tellerL
totaalH = tellerH
tellerL = 0
tellerH = 0
npass = totaalpass
end if
end if
end procedure
bank_1
option = 0b_0100_0110
bank_0
tellerL = 0
tellerH = 0
totaalL = 0
totaalH = 0
npass = totaalpass
tmr0 = myinitt0
intcon_intf = low
intcon_T0if = low
intcon_inte = high
intcon_t0ie = high
intcon_gie = high
forever loop
bin2bcd3 (msd, osd, lsd, totaalH, totaalL)
hd44780_clear
dig = ( msd& 0x0F ) + "0"
hd44780 = dig
dig = ( osd >> 4 ) + "0"
hd44780 = dig
dig = ( osd & 0x0F ) + "0"
hd44780 = "."
hd44780 = dig
dig = ( lsd >> 4 ) + "0"
hd44780 = dig
dig = ( lsd & 0x0F ) + "0"
hd44780 = dig
delay_1s( 1 )
end loop
terrorfeary
elektronica , het is zoals het weer , het word zelden wat je verwacht :) plz cheak out my new site :http://www.terrorfeary.tk
Aedolon
Just face it: sometimes nobody envies you. There has to be a bottom and that bottom is probaly you. // http://www.amazon.com/o/registry/VWZ93N4Y6XQT
Op 30 november 2003 19:31:49 schreef terrorfeary:
include f877_4 ?
waar zeg je welke pic je gebruikt en welk kristal ?
in include f877_4....
Op 30 november 2003 19:31:49 schreef terrorfeary:
include f877_4 ?
waar zeg je welke pic je gebruikt en welk kristal ?
877 betekent 16F877 en de _4 betekent 4MHz
Jonathan
"Theorie is alleen te rechtvaardigen als 'n vorm van praktijk. De praktijk staat niet terecht voor 't hooggerechtshof van de theorie" (Stephan Toulmin)