$regfile = "AVRX128db28.dat"
$crystal = 24000000
$hwstack = 40
$swstack = 40
$framesize = 40
'The AVRX series have more oscillator options
Config Osc = Enabled , Frequency = 24mhz
'set the system clock and prescaler
Config Sysclock = Int_osc , Prescale = 1
Config Submode = New
Debug On
'----------test nextion JP 31-01-2022
'-----------------------------------------------------------------------------------------------------------------------------
'(
$regfile = "m1284pdef.dat" ' "m1284pdef.dat" ' "m1284def.dat"
$crystal = 11052000 '16000000 ' 11052000
$hwstack = 300 '300
$swstack = 250 '200
$framesize = 300 '300
Config Submode = New
Debug On 'On if you debug off you remove all print from USB port
')
' config debug--------------------------------------------------------------------------------------------------------
'Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Config Com1 = 115200 , Mode = Asynchroneous , Parity = None , Databits = 8 , Stopbits = 1
Echo Off
Config Serialin0 = Buffered , Size = 30
Config Serialout0 = Buffered , Size = 30 'RX from Terminal
Open "COM1:" For Binary As #1
Const Usb = 1
'---serial port-------------------------------------------------------------------------------------------------------------
Const Nex = 2
'Config Com2 = 19200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 '34800
Config Com2 = 9600 , Mode = Asynchroneous , Parity = None , Databits = 8 , Stopbits = 1
Open "COM2:" For Binary As #2
Config Serialin1 = Buffered , Size = 50
Config Serialout1 = Buffered , Size = 30
|