Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20802

BASCOM-AVR : XRAM + HARD SPI not work!? : NEWTOPIC

$
0
0
Hi everyone! SRAM connected as in the description HELP BASCOM - Adding XRAM to XMEGA using EBI CY7C1049DV33-10 - 512k x 8 [code:1:1e21208090] $regfile = "xm128A1def.dat" $crystal = 2000000 $hwstack = 300 ' default use 32 for the hardware stack $swstack = 300 ' default use 10 for the SW stack $framesize = 200 ' default use 40 for the frame space $xramstart = &H4000 $xramsize = &H80000 ' All EBI-Ports must be set to OUTPUT ' All Ports, ACTIVE-LOW , must be set to 1 !!! ' All Ports, ACTIVE-HIGH, must be set to 0 !!! 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 Config Xram = 3port , Ale = Ale12 , Sdbus = 8 , Modesel0 = Sram , Adrsize0 = 256b , Waitstate0 = 0 , Baseadr0 = &H10000 , Modesel1 = Sram , Adrsize1 = 512k , Waitstate1 = 0 , Baseadr1 = &H20000 'We enable Low Level Interrupts in static mode Config Priority = Static , Vector = Application , Lo = Enabled 'SPI_PIN____________________________ Config Pinc.7 = Output 'SCK Sck Alias Portb.1 Config Pinc.5 = Output 'MOSI Mosi Alias Portc.5 Config Pinc.6 = Input 'MISO Miso Alias Pinc.6 Config Pinc.4 = Output Spi_ss Alias Portc.4 'Set Spi_ss ' Set SPI-SS to Portc_pin6ctrl = &B00_011_000 ' MISO pin pull up Config Spic = Hard , Master = Yes , Mode = 0 , Clockdiv = Clk64 , Data_order = Msb Open "SPIC" For Binary As #12 'TOUCH_PIN__________________________ Config Pinc.1 = Output Cs_touch Alias Portc.1 Set Cs_touch Config Pinf.3 = Input Int_touch Alias Pinf.3 ' Set Int_touch 'BEEP_PIN___________________________ Config Pinr.0 = Output Beep Alias Portr.0 Do Set Beep Reset Cs_touch Print #12 , 144 Set Cs_touch Waitms 100 Reset Beep Wait 1 Loop End 'end program [/code:1:1e21208090] This code stops at the line [b:1e21208090]Print # 12, 144[/b:1e21208090] EBI - SRAM, DISPLAY work, SPI not work and also in the simulator. If you comment out $xramstart = &H4000, SPI works, EBI - SRAM, DISPLAY not work. What could be the problem? Thanks, Ruslan. [b:1e21208090][color=red:1e21208090](BASCOM-AVR version : 2.0.7.7 )[/b:1e21208090][/color:1e21208090]

Viewing all articles
Browse latest Browse all 20802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>