Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ATxmega128B3

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sat May 07, 2016 10:43 am    Post subject: ATxmega128B3 Reply with quote

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
View user's profile
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Mon May 09, 2016 8:53 pm    Post subject: XMEGA128B3 Reply with quote

Hi,

Can I use the XMEGA128B1 ?

Best regards

Georges
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5284
Location: Holland

blank.gif
PostPosted: Mon May 09, 2016 8:58 pm    Post subject: Reply with quote

yes.
i will ask Tomi to add the B3 as well.

_________________
Mark
Back to top
View user's profile Visit poster's website
tomi

Administrator



Joined: 22 Feb 2005
Posts: 155
Location: Universe

blank.gif
PostPosted: Mon May 09, 2016 11:00 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Wed May 11, 2016 7:33 pm    Post subject: Thanks Reply with quote

Many Thanks

Georges
Back to top
View user's profile
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sat Jun 18, 2016 8:48 pm    Post subject: XMEGA128B3 Reply with quote

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
View user's profile
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sun Jun 19, 2016 8:23 am    Post subject: XMEGA Reply with quote

Hi,

How can I configure PORTM ?

SET an output ?
READ an input ?

Best regards

Georges
Back to top
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2132

netherlands.gif
PostPosted: Sun Jun 19, 2016 10:56 am    Post subject: Reply with quote

The ide doesn't know portm yet, but you can use the registers direct yourself.

Set port direction:
Code:
DDRM= $B00001010


Read a pin:
Code:
a= PINM.1


Set a pin:
Code:
Set PORTM.2

_________________
www.evertdekker.com Bascom code vault
Back to top
View user's profile Visit poster's website
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sun Jun 19, 2016 12:55 pm    Post subject: Thanks Reply with quote

Many Thanks

Georges
Back to top
View user's profile
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sun Jun 26, 2016 6:26 am    Post subject: SERIAL PORT Reply with quote

Hi,

The hardware serial port does not work properly.

Can anybody make a test with a 128B3 ?

Best regards

Georges
Back to top
View user's profile
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Sun Jun 26, 2016 10:27 pm    Post subject: Reply with quote

$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
View user's profile
Evert :-)

Bascom Expert



Joined: 18 Feb 2005
Posts: 2132

netherlands.gif
PostPosted: Mon Jun 27, 2016 8:19 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Mon Jun 27, 2016 10:10 pm    Post subject: PINS Reply with quote

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
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 751

poland.gif
PostPosted: Mon Jun 27, 2016 10:33 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
georgestheking

Bascom Member



Joined: 06 May 2005
Posts: 130

PostPosted: Wed Jun 29, 2016 9:25 pm    Post subject: calibration Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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