View previous topic :: View next topic |
Author |
Message |
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Nov 24, 2014 12:20 pm Post subject: Xmega 32E5 timer unknow |
|
|
Hello,
I would like to understand timer with Xmega 32E5
on the datasheet I see 3 timers type 4 and 5
so I try this small program :
' test of Xmega32E5 X plained card
'using of AVRISP MKII
'-----------------------------------------------------------------
$regfile = "xm32e5def.dat"
$crystal = 32000000 '32MHz
$hwstack = 64
$swstack = 40
$framesize = 40
'first enable the osc of your choice
Config Osc = Enabled , 32mhzosc = Enabled
'configure the systemclock
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
Config Priority = Static , Vector = Application , Lo = Enabled
Config Portd.4 = Output
'Timer C4 'see datasheet Page 34
Config Tcc4 = Normal , Prescale = 1024
Tcc4_per = 31250 '32MHz/1024 = 31250 --> One Second Tick
On Tcc4_ovf Tc4_isr 'Setup overflow interrupt of Timer/Counter C0 and
name ISR
Enable Tcc4_ovf , Lo 'Enable overflow interrupt in LOW Priority
Enable Interrupts
Do
!nop
Loop
End 'end program
'--------------------[Interrupt Service Routines]-------------------------------
Tc4_isr:
Toggle Portd.4 ' to make led lights
Return
And I have 2 errors 12 unknown parameter TCC4 and prescale
Where is my mistake ?
JP
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Nov 25, 2014 10:01 am Post subject: |
|
|
The timers in E5 are different. you need an update of the dat files. _________________ Mark |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Tue Nov 25, 2014 6:41 pm Post subject: |
|
|
thanks Mark,
Quote: | The timers in E5 are different. you need an update of the dat files.
|
I use 2.0.7.7 004 version. Where is the new one ?
JP
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Nov 26, 2014 1:11 pm Post subject: |
|
|
I sent them to you via support. _________________ Mark |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Wed Nov 26, 2014 7:00 pm Post subject: |
|
|
You are the best Mark, As usual ! |
|
Back to top |
|
|
16mk
Joined: 26 Feb 2016 Posts: 19
|
Posted: Wed Mar 16, 2016 11:07 pm Post subject: |
|
|
Hello Duval JP
I've tried your code (the only change is xmega85e) and only the first period after each power on is 1s. The all next periods are 3us. |
|
Back to top |
|
|
|