View previous topic :: View next topic |
Author |
Message |
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sat May 07, 2016 10:43 am Post subject: ATxmega128B3 |
|
|
Hi,
I design a board with the ATxMEGA128B3.
How can I use the Bascom Compiler ?
This Chip is not in the chip list !
Best regards
Georges
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Mon May 09, 2016 8:53 pm Post subject: XMEGA128B3 |
|
|
Hi,
Can I use the XMEGA128B1 ?
Best regards
Georges |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon May 09, 2016 8:58 pm Post subject: |
|
|
yes.
i will ask Tomi to add the B3 as well. _________________ Mark |
|
Back to top |
|
|
tomi
Joined: 22 Feb 2005 Posts: 155 Location: Universe
|
Posted: Mon May 09, 2016 11:00 pm Post subject: |
|
|
Hi,
here is B3 file, if you found any problem with file please report it to support@mcselec.com
(after download change extension to .dat) _________________ Best regards,
/Tomi |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Wed May 11, 2016 7:33 pm Post subject: Thanks |
|
|
Many Thanks
Georges |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sat Jun 18, 2016 8:48 pm Post subject: XMEGA128B3 |
|
|
Thanks for the DAT file.
But support for PORTG and PORTM is missing.
I get this from MCS support.
Add to the IOEXT
DDRM=1888
PORTM=1892
PINM=1896
DDRG=1728
PORTG=1732
PING=1736
But Still missing support for port M.
Best regards
Georges |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sun Jun 19, 2016 8:23 am Post subject: XMEGA |
|
|
Hi,
How can I configure PORTM ?
SET an output ?
READ an input ?
Best regards
Georges |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Sun Jun 19, 2016 10:56 am Post subject: |
|
|
The ide doesn't know portm yet, but you can use the registers direct yourself.
Set port direction:
Read a pin:
Set a pin:
_________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sun Jun 19, 2016 12:55 pm Post subject: Thanks |
|
|
Many Thanks
Georges |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sun Jun 26, 2016 6:26 am Post subject: SERIAL PORT |
|
|
Hi,
The hardware serial port does not work properly.
Can anybody make a test with a 128B3 ?
Best regards
Georges |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Sun Jun 26, 2016 10:27 pm Post subject: |
|
|
$regfile = "xm128b3def.dat"
$crystal = 32000000
$hwstack = 96
$swstack = 64
$framesize = 64
'First Enable The Osc Of Your Choice , make sure to enable 32 KHz clock or use an external 32 KHz clock
Config Osc = Enabled , 32mhzosc = Enabled
'configure the systemclock
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
Config Com1 =9600 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Does not work.
Serial Characters are not receive.
Best regards
Georges |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Mon Jun 27, 2016 8:19 am Post subject: |
|
|
If you say "Doesn't receive" is it sending?
What pins are you using for com1? Should be TX=C.3 RX= C.2 _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Mon Jun 27, 2016 10:10 pm Post subject: PINS |
|
|
Hi,
Thanks for your help.
I use the right PINS.
I think baudrate or format is not right or something like this.
I communique at 8 bit, 1 stop, 9600 bauds ( GSM SIM808 )
I see character on RX with a sniffer but CPU do not see it.
Best regards
Georges |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Mon Jun 27, 2016 10:33 pm Post subject: |
|
|
Try adapt to your Xmega.
For better transmision stability automatic osc calibration is enabled.
Your speed 9600 is slow but for higher (I test this) calibration must be done to avoid transmision errors.
Code: |
$regfile = "xm128a3udef.dat"
$crystal = 32000000 '32MHz
$hwstack = 80 'this is for my other tasks so
$swstack = 100 'you can modify values to your needs
$framesize = 100
Config Submode = New
Const Debuging = 0
' ***************** SYSTEM CLOCK CONFIG **************************
' INTERNAL 32MHz NO PRESCALE
'
Config Osc = Disabled , 32mhzosc = Enabled , 32khzosc = Enabled
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1
'
' ENABLING AUTOMATIC OSCILLATOR CALIBRATION
Osc_dfllctrl.0 = 1
Dfllrc32m_ctrl.0 = 1
'
'*****************************************************************
'************ CONFIGURATION FOR COM1 ON PORTC ********************
' COM1
Config Com1 = 115200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 'Tx-PC3 Rx-PC2
Open "COM1:" For Binary As #1
Config Serialin0 = Buffered , Size = 100 'for COM1
Config Input1 = Crlf , Echo = Crlf
'*****************************************************************
#if Debuging = 1
'*********** CONFIGURATION FOR COM2 ON PORTC *********************
' COM2 IS FOR DEBUG SO SEPARATE CONFIG
Config Com2 = 115200 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 'Tx-PC7 Rx-PC6
Open "COM2:" For Binary As #2
Config Serialin1 = Buffered , Size = 50 'for COM2
Config Input2 = Cr , Echo = Cr
'*****************************************************************
#endif
End |
|
|
Back to top |
|
|
georgestheking
Joined: 06 May 2005 Posts: 134
|
Posted: Wed Jun 29, 2016 9:25 pm Post subject: calibration |
|
|
Hi,
Thanks for your help but problem is still there.
Perhaps there is a probleme with the DAT file ?
Best regards
Georges |
|
Back to top |
|
|
|