Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
psoft Joined: 15 Apr 2016 Posts: 3
Posted: Thu Apr 28, 2016 10:00 am Post subject: External interrupt Xmega
Hi i have problem with interrupt on pine.1 (xmega128a1u). The event must be low but there is no reaction .
configure example:
Config Pine.1 = Input
On Porte_int1 Touch_event
Enable Porte_int1 , Lo
Porte_pin1ctrl = &B00_011_010
Porte_int0mask = &B0000_0010
Enable Interrupts
do
......
loop
touch_event:
............
return
Where is problem?
(BASCOM-AVR version : 2.0.7.8 , Latest : 2.0.7.8 )
Back to top
MWS Joined: 22 Aug 2009 Posts: 2262
Posted: Thu Apr 28, 2016 12:21 pm Post subject:
Where do you enable interrupts globally for Lo?
Mind to read the help?
Back to top
psoft Joined: 15 Apr 2016 Posts: 3
Posted: Thu Apr 28, 2016 1:58 pm Post subject:
MWS wrote: Where do you enable interrupts globally for Lo?
Mind to read the help?
Yes , this is completly code:
$regfile = "xm128a1def.dat"
$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014
$hwstack = 1024
$swstack = 1024
$framesize = 1024
$crystal = 48000000
Osc_pllctrl = &B11_0_01100
Config Osc = Disabled , Pllosc = Enabled , Extosc = Enabled , 32khzosc = Disabled , 32mhzosc = Disabled , _
Range = 9mhz_12mhz , 32khzpowermode = Low_power , Startup = Xtal_256clk
Config Sysclock = Pll , Prescalea = 1 , Prescalebc = 1_1
Config Priority = Static , Vector = Application , Lo = Enabled
Config Pine.1 = Input
On Porte_int1 Touch_event
Porte_pin1ctrl = &B00_011_010
Porte_int0mask = &B0000_0010
Enable Porte_int1 , Lo
Enable Interrupts
do
.............
loop
touch_event:
....
return
OK i see problem, mask is on int0 I use int1, thank yuo.
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum