Thanks Luciano,
Im read up the pbp manual and others for interrupts...
..however my test program isnt compiling..
1> compile error "DEFINE INTHAND myint"Code:wsave VAR BYTE $20 system 'bank0 wsave1 VAR BYTE $a0 system 'bank1 'wsave2 VAR BYTE $120 system 'bank2 'wsave3 VAR BYTE $1a0 system 'bank3 ssave VAR BYTE bank0 system psave VAR BYTE bank0 system led VAR PORTB.1 GoTo start_0 ' Skip around interrupt handler DEFINE INTLHAND myint ' DEFINE INTERRUPT handler Asm myint: bsf _led ; Turn on LED (for example) bcf intcon.0 retfie EndAsm ' Assembly language INTERRUPT handler start_0: TRISB=%11111101 Low led ' Turn LED off INTCON = %10001000 ' Enable INTERRUPT ON PORTB.0 loop: GoTo loop ' Wait here till interrupted
....undefined symbol myint
however if i relpace it with DEFINE INTLHAND myint,(which is only for th 18x series),it complies ok..
2>im using a 16F873A,which has a 4K flash,meaning 4 banks...
according to the PBP manual, i have to define wsave,wsave1,wsave2,wsave3...
it takes in wsave and wsave1...but when i declare wsave2 and wsave3..it gives a RAM_END 255 error
3>i cannot get the LED to blink either by using the int0 or the Interr On change<4:7>




Bookmarks