krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Wed May 11, 2022 1:46 pm Post subject: xmega32e5 and PCF8574 |
|
|
Hi,
wasting no time according to learn xmega I try to use lcd 16x2 with i2c converter PCF8574. As for atmega there was not problem here with atxmega I suppose that my code is not valid or I can't simply use bl_Lcd_i2c.lib library. During compilation get errors
Code: | Error : 5 Line : -332 No more space for BIT [TWI_START] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 5 Line : -332 No more space for BIT [TWI_START] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 5 Line : -332 No more space for BIT [TWI_START] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 5 Line : -332 No more space for BIT [TWI_START] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 320 Line : 209 [syntax error, token = '{'] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 320 Line : 211 [syntax error, token = '{'] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 320 Line : 240 [syntax error, token = '{'] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
Error : 320 Line : 246 [syntax error, token = '{'] , in File : C:\MCS\BASCAVR2082\LIB\XMEGA.LIB
|
The code:
Code: |
$regfile = "xm32e5def.dat"
$crystal = 32000000 '32MHz
$hwstack = 80
$swstack = 60
$framesize = 60
$lib "bl_Lcd_i2c.lib"
Config Osc = Enabled , 32mhzosc = Enabled 'We use internal 32MHz
Config Sysclock = 32mhz , Prescalea = 1 , Prescalebc = 1_1 'Internal 32MHz, no prescaler
Config Twic=100000
Config Scl = Portc.1
Config Sda = Portc.0
Const Pcf_d4 = 4
Const Pcf_d5 = 5
Const Pcf_d6 = 6
Const Pcf_d7 = 7
Const Pcf_rs = 0
Const Pcf_rw = 1
Const Pcf_e1 = 2
Dim _lcd_e As Byte
Dim Backlight As Byte
Backlight_on Alias &H08
Backlight_off Alias &H00
Backlight = Backlight_on
_lcd_e = 128
Const Pcf8574_lcd = &H4E 'Defines the address of the I/O expander for LCD
Locate 1 , 1
Lcd "Whatever"
End
|
Best regards,
Martin
(BASCOM-AVR version : 2.0.8.5 ) |
|