View previous topic :: View next topic |
Author |
Message |
Tiny
Joined: 10 Nov 2010 Posts: 101 Location: The Netherlands
|
Posted: Sun Apr 12, 2015 10:37 am Post subject: Atxmega32e5 |
|
|
Hello,
For A new design is want to use the Atmega32e5-au
Is the Atmega32e5-au supported?
Witch DAT File must i Select for this cpu?
Reguards,
Tiny
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sun Apr 12, 2015 5:56 pm Post subject: |
|
|
hello,
you must use xm32E5def.dat, I test the Atmel module . It works but finally, I go back to the Arduino M2560
JP |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 101 Location: The Netherlands
|
Posted: Sun Apr 12, 2015 6:04 pm Post subject: |
|
|
Thankx JP |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 101 Location: The Netherlands
|
Posted: Wed May 06, 2015 9:06 pm Post subject: |
|
|
I want to use both the uarts on portD, but de compiler give a error "uart is not available " on com4
The second problem i get is how to calibrate the 32mhz internal clock?
i get a error "Error : 41 Line : 158 Variable can not be used with SET [DFLLRC2M_CTRL]
regard Tiny
Code: |
'*******************************************************************************
$regfile = "xm32E5def.dat"
$crystal = 32000000 '32MHz
$hwstack = 60
$swstack = 30
$framesize = 30
Config Submode = New
'*******************************************************************************
' Config Clock
'*******************************************************************************
Config Osc = Enabled , 32mhzosc = Enabled , 32khzosc = Enabled
Osc_dfllctrl = &B00000000
'Enable DFLL and autocalibration
Set Dfllrc2m_ctrl.0
Set Dfllrc32m_ctrl.0
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
'*******************************************************************************
' Config compoort
' Com4 as direct serial port to main cpu
' Com3 as RS485 bus communication port
'*******************************************************************************
Config Com4 = 115200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Open "COM4:" For Binary As #3
Config Com3 = 19200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Config Portd.1 = Output ' Dir rs485
Config Print = Portd.1 , Mode = Set
|
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Wed May 06, 2015 9:26 pm Post subject: |
|
|
- DFLLRC2M_CTRL : this register is not available in this chip so you can not set it. The fact that the IDE does not color this register gives that away too.
- the config comx in the help shows the map of the usarts. use com1 and com3 since only usartc0 and usartd0 exists in this chip! _________________ Mark |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 101 Location: The Netherlands
|
Posted: Wed May 06, 2015 9:39 pm Post subject: |
|
|
Oke thats clear,
how do i calibrate the internal 32mhz clock then ?
regard Tiny |
|
Back to top |
|
|
|