View previous topic :: View next topic |
Author |
Message |
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Tue Jul 01, 2014 4:17 pm Post subject: same µC, same port configuration first prog ok second error |
|
|
Hi basic Bascom users,
I try to use the program for SSD1963 writed by Hkipnik and based on a xmega
I would like to use with Arduino mega2560 (the program writed by Ben Zijstra is working well but I need Sd card and touch screen)
so :
$regfile = "m2560def.dat"
$crystal = 16000000
$hwstack = 128
$swstack = 128
$framesize = 128
$baud = 115200
Config Submode = New
$include "ssd1963sub.inc"
$include "ssd1963dim.inc"
Vh Alias Porta 'pin 22 to 29 of the 36 arduino conn. 13 to 27 (step 2) of 40 ITB2 conn.
Vl Alias Portc 'pin 37 to 30 of the 36 arduino conn. 2 to 16 (step 2) of 40 ITB2 conn.
Rs_disp Alias Portd.7 'pin 38 of 36 connector ok pin 7 of 40 ITB2 connector : register/data
Wr_disp Alias Portg.2 'pin 39 of 36 connector ok pin 9 of 40 ITB2 connector : write data
Cs_disp Alias Portg.1 'pin 40 of 36 connector ok pin 29 of 40 ITB2 connector : Chip select
Lcd_res Alias Portg.0 'pin 41 of 36 connector ok pin 33 of 40 ITB2 connector : reset
'rd disp is pull up pin 11 of 40
Config Porta = Output 'db8-db15
Config Portc = Output 'db0-db7
Config Rs_disp = Output
Config Wr_disp = Output
Config Cs_disp = Output
Config Lcd_res = Output
'------------------------------------is compiled without any err----------------------------------------------------
but:
'auf Treiber IC SSD1963 geändert 26.11.2011
'10.09.2012 angepast für Display Typ AT070TN90
'Hkipnik@aol.com
'modified by jpduval for 5.00" ITB202-5.0
'with arduino mega560
'*******************************************************************************
'(
$regfile = "xm128a1def.dat"
$hwstack = 200
$swstack = 200
$framesize = 500
$crystal = 32000000
Config Osc = Enabled , 32mhzosc = Enabled
Config Sysclock = 32mhz '--> 32MHz
')
$regfile = "m2560def.dat"
$crystal = 16000000
$hwstack = 128
$swstack = 128
$framesize = 128
$baud = 115200
Cs_disp Alias Portg.1 ' /Chip Select Display
Res_disp Alias Portg.0 ' /Reset Display für INIT
Rs_disp Alias Portd.7 ' Indexregister = 0, Data = 1
Wr_disp Alias Portg.2 ' write data to Display
Config Cs_disp = Output
Config Res_disp = Output
Config Rs_disp = Output
Config Wr_disp = Output
'---------------------------err:
Error : 41 Line : 34 Variable can not be used with SET [DDRG] , in File : D:\developpement-14\arduino2560\7inches\SSD1963 ITB2_5_jp01.bas
Error : 41 Line : 35 Variable can not be used with SET [DDRG] , in File : D:\developpement-14\arduino2560\7inches\SSD1963 ITB2_5_jp01.bas
Cs-disp and Res_disp are in error
the rest of the program is remarqued
Thanks for your help
JP :cry:
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Tue Jul 01, 2014 5:53 pm Post subject: |
|
|
Hi,
Looks as if you have two $regfile = lines ($regfile = "xm128a1def.dat"/$regfile = "m2560def.dat").
That'll cause Bascom problems.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Tue Jul 01, 2014 6:00 pm Post subject: |
|
|
many thanks Ian
but the first regfile was remarked, incredible !
I have remove it and is ok now !
jp |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Wed Jul 02, 2014 1:11 am Post subject: |
|
|
I never tried putting the $regfile statement inside a block comment. Maybe the Bascom parser looks inside the block and detects the $regfile keyword. Seems to work ok when you just use a line comment
[edit]
Yes indeed, I just tried it.
Putting the $regfile directive inside a block comment has no effect, the $regfile is still set to the dat file specified.
But putting a leading ' comment character on the line does cause the parser to skip the $regfile.
Sent a note to support. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Sun Jul 06, 2014 11:11 am Post subject: |
|
|
I found that selecting block of code by mouse and use combined Ctrl + M does better job and uses " ' " automatic remarks on all lines. |
|
Back to top |
|
|
|