Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

problem with xmega xram ebi

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
Kaiser48

Bascom Member



Joined: 04 Feb 2005
Posts: 18
Location: Berlin

germany.gif
PostPosted: Wed Oct 29, 2014 8:44 pm    Post subject: problem with xmega xram ebi Reply with quote

Hi all,

my first steps with Xmega128A1 are not very successful.
I wrote a little bit of code to write data to an external device with a databus of 8 bit and an addressbus with also 8 bits.
But what ever i am trying to config for xram, nothing happens at the Ports J, K and H ! What's going wrong?

Thank' for your help!

That's my code:

[$regfile = "xm128a1def.dat"
$crystal = 8000000 '8MHz
$hwstack = 64
$swstack = 40
$framesize = 40
$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014


Config Osc = Enabled, 32mhzosc = Enabled 'We use internal 32MHz
Config Sysclock = 32mhz , Prescalea = 4 , Prescalebc = 1_1 'Internal 32MHz, prescaler = 4

CONFIG XRAM=3PORT, MODESEL0=SRAM, ADRSIZE0=256b, BASEADR0=&h2000, ALE=ALE1, WAITSTATE0=4
$xramsize = &h8000

waitms 1
Dim B As Byte

Porth_dirset = &B1111_1111 : Porth = &B1111_0011 'WR, RD, ALE1, ALE2, CS0-3 = output : ALE1 & 2 auf 0 !!!
Portj_dirset = &B1111_1111 : Portj = &B1111_1111
Portk_dirset = &B1111_1111 : Portk = &B1111_1111

B = 0

Do
Incr B
Out &h2001 , B
Waitus 1
OUT &h2003 , B
Waitus 1
Loop

End
]

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5916
Location: Holland

blank.gif
PostPosted: Wed Oct 29, 2014 9:06 pm    Post subject: Reply with quote

have a look in the help at topic : Adding XRAM to XMEGA using EBI
It shows how to add 128KB SRAM.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive 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