Hi there,
I am using thermometer with ATmega88 and two DS18B20 sensors in multi node bus.
The resolution is 0.1 °C and all work well except one unusual thing.
I found a difference between the two sensors, I explain:
There is a difference about two degres 2°C between them. Let's say Sensors_1 in point A and Sensor_2 in point B.
For example when sensors_1 say 28°C in point A and the sensor_2 in point B say 30°C, till this point, there is no problem, but if
I swap the two sensors the point A become 30°C and the point B become 28°C. I deduce that the problem comes from sensors.
The question is : How it is possible and do someone experince similar problem.
Thank's
[b:0a311754a8][color=red:0a311754a8](BASCOM-AVR version : 2.0.7.1 , Latest : 2.0.7.7 )[/b:0a311754a8][/color:0a311754a8]
↧
BASCOM-AVR : Temperature differences between two DS18B20 sensors. : NEWTOPIC
↧
BASCOM-AVR : Temperature differences between two DS18B20 sensors. : REPLY
First I would try what the sensors show when they are both in the same place.
↧
↧
BASCOM-AVR : Temperature differences between two DS18B20 sensors. : REPLY
I assume you are using 12-bit mode.
I assume you are looking at the data readings before any rounding.
They are spec'd to +/- 0.5 deg C at that temperature.
You should test them with the sensors connected together, so they are physically connected, and at the same temperature.
Out of the sun light, our of any air currents.
See how close they read.
You can also put them both, together, in a plastic baggie, (to keep the leads dry), and put it in ice water.
Again, see how close they read.
One assumes you have a stable, and clean, power supply.
JC
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
[quote:04d64e2d72]Please Help with Example settings COM2 (PORTC.7 PORTC.6) in MASTER SPI MODE. [/quote:04d64e2d72]This makes little sense. SPI mode has nothing to do with COM port.
What do you want to do?
With what Avr type?
↧
BASCOM-AVR : Temperature differences between two DS18B20 sensors. : REPLY
@Visovian and JC
You're right I put them on the same point the difference has decreased, now it's about 0.2 - 0.4°C I think it's normal in this case.
Thank's again for the reply.
↧
↧
BASCOM-AVR : data problem : REPLY
Hello All,
Can 'Data' be configured as a 2 o3 dimensional structure, with varying lengths of elements like this C code - which consists of constants and a structure:
#define RF_POWER_UP 0x02, 0x01, 0x01, 0x01, 0xC9, 0xC3, 0x80
#define RF_GPIO_PIN_CFG 0x13, 0x5C, 0x53, 0x5B, 0x51, 0x00, 0x00
#define RADIO_CONFIGURATION_DATA_ARRAY {
0x07, RF_POWER_UP,
0x07, RF_GPIO_PIN_CFG,
0x00
}
const u8 RFM24_CONFIGURATION_DATA[]=RADIO_CONFIGURATION_DATA_ARRAY;
Maybe the better question is, can Data be given a unique name?
Ians code
[quote:9649175d5e]
Rx_structure:
Data 2 , Setup_aw , &B00000001 '3bit address
Data 4 , Rx_addr_p0 , &H01 , &H42 , &H24 'RX adress for pipe0
Data 2 , En_aa , &H01 'Enable auto ACK for pipe0
Data 2 , En_rxaddr , &H01 'Enable RX adress for pipe0
Data 2 , Rf_ch , 99 'Set RF channel
Data 2 , Rx_pw_p0 , 3 'Set RX pload width for pipe0
Data 2 , Rf_setup , &B00000111 'Setup RF-> Output power 5dbm, datarate 1Mbps and LNA gain on
Data 2 , Config_nrf , &B00001011 'Setup CONFIG-> PRX=1(RX_device), PWR_UP=1, CRC 1bytes, Enable CRC
Data 0 'end of data
[/quote:9649175d5e]
Is really similar to what I was thinking, except giving the word "Data" a unique name. Is this possible?
Tim
↧
BASCOM-AVR : data problem : REPLY
Hi Tim,
In my example the "Names" are just constants defined else where in the code. It just makes the code easier to read.
It give it a unique Name just define a Label (Rx_structure: in this case)
Regards
Ian Dobson
↧
BASCOM-AVR : data problem : REPLY
Hi Ian,
That is exactly what I was getting at. Except I wanted to know if it could be expanded to a 'Data' type (I know it is is not a type, but for lack of a better word...).
What they (HopeRF) did in C, was a little similar to what you did, except some really key issues:
1) They used defines that allow for > 1 value for each *constant Name*
2) They combined the defines (*constants*) into a multidemensional array, where each element has a different field length - which *is* similar to yours in that you describe the length of data to be part of the Data line.
Maybe I am missing something. Is by default a list of Data commands, as called by Ian a "structure" similar to or equal to a Structure in other languages?
[quote:d5a9e13af5]
Rx_structure:
Data 2 , Setup_aw , &B00000001 '3bit address
Data 4 , Rx_addr_p0 , &H01 , &H42 , &H24 'RX adress for pipe0
Data 2 , En_aa , &H01 'Enable auto ACK for pipe0
Data 2 , En_rxaddr , &H01 'Enable RX adress for pipe0
Data 2 , Rf_ch , 99 'Set RF channel
Data 2 , Rx_pw_p0 , 3 'Set RX pload width for pipe0
Data 2 , Rf_setup , &B00000111 'Setup RF-> Output power 5dbm, datarate 1Mbps and LNA gain on
Data 2 , Config_nrf , &B00001011 'Setup CONFIG-> PRX=1(RX_device), PWR_UP=1, CRC 1bytes, Enable CRC
Data 0 'end of data
[/quote:d5a9e13af5]
LIke you have done Ian, I am trying to find a way to make understanding the code , and what each parameter of each command & property means, without going to some lookup reference document. Not ever having to try to do this in BASCOM, it is new to me and therefore the seemingly ridiculous questions.
Tim
*C Code*
[code]#define RF_POWER_UP 0x02, 0x01, 0x01, 0x01, 0xC9, 0xC3, 0x80
#define RF_GPIO_PIN_CFG 0x13, 0x5C, 0x53, 0x5B, 0x51, 0x00, 0x00
#define RF_GLOBAL_XO_TUNE_1 0x11, 0x00, 0x01, 0x00, 0x3F
#define RF_GLOBAL_CONFIG_1 0x11, 0x00, 0x01, 0x03, 0x40
#define RF_INT_CTL_ENABLE_2 0x11, 0x01, 0x02, 0x00, 0x01, 0x30
#define RF_FRR_CTL_A_MODE_4 0x11, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00
#define RF_PREAMBLE_TX_LENGTH_9 0x11, 0x10, 0x09, 0x00, 0x08, 0x14, 0x00, 0x0F, 0x31, 0x00, 0x00, 0x00, 0x00
#define RF_SYNC_CONFIG_5 0x11, 0x11, 0x05, 0x00, 0x01, 0xB4, 0x2B, 0x00, 0x00
#define RF_PKT_CRC_CONFIG_1 0x11, 0x12, 0x01, 0x00, 0x80
#define RF_PKT_CONFIG1_1 0x11, 0x12, 0x01, 0x06, 0x02
#define RF_PKT_LEN_3 0x11, 0x12, 0x03, 0x08, 0x00, 0x00, 0x00
#define RF_PKT_FIELD_1_LENGTH_12_8_12 0x11, 0x12, 0x0C, 0x0D, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
#define RF_PKT_FIELD_4_LENGTH_12_8_8 0x11, 0x12, 0x08, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
//#define RF_MODEM_MOD_TYPE_12 0x11, 0x20, 0x0C, 0x00, 0x02, 0x00, 0x07, 0x00, 0x09, 0x60, 0x00, 0x2D, 0xC6, 0xC0, 0x00, 0x09
#define RF_MODEM_MOD_TYPE_12 0x11, 0x20, 0x0C, 0x00, 0x02, 0x00, 0x07, 0x00, 0x09, 0x60, 0x00, 0x2D, 0xC6, 0xC0, 0x00, 0x04
//#define RF_MODEM_FREQ_DEV_0_1 0x11, 0x20, 0x01, 0x0C, 0x8F
#define RF_MODEM_FREQ_DEV_0_1 0x11, 0x20, 0x01, 0x0C, 0xC7
//#define RF_MODEM_TX_RAMP_DELAY_8 0x11, 0x20, 0x08, 0x18, 0x01, 0x80, 0x08, 0x03, 0x80, 0x00, 0x12, 0x10
#define RF_MODEM_TX_RAMP_DELAY_8 0x11, 0x20, 0x08, 0x18, 0x01, 0x80, 0x08, 0x03, 0xC0, 0x00, 0x12, 0x10
#define RF_MODEM_BCR_OSR_1_9 0x11, 0x20, 0x09, 0x22, 0x04, 0x12, 0x00, 0x7D, 0xD4, 0x00, 0x3F, 0x02, 0xC2
//#define RF_MODEM_AFC_GEAR_7 0x11, 0x20, 0x07, 0x2C, 0x04, 0x36, 0x80, 0x02, 0x75, 0x0B, 0x80
#define RF_MODEM_AFC_GEAR_7 0x11, 0x20, 0x07, 0x2C, 0x04, 0x36, 0x80, 0x01, 0x75, 0x0B, 0x80
#define RF_MODEM_AGC_CONTROL_1 0x11, 0x20, 0x01, 0x35, 0xE2
#define RF_MODEM_AGC_WINDOW_SIZE_9 0x11, 0x20, 0x09, 0x38, 0x11, 0xE4, 0xE4, 0x00, 0x02, 0x74, 0xAA, 0x00, 0x2B
#define RF_MODEM_OOK_CNT1_11 0x11, 0x20, 0x0B, 0x42, 0xA4, 0x02, 0xD6, 0x81, 0x05, 0xEA, 0x01, 0x80, 0xFF, 0x0C, 0x00
#define RF_MODEM_RSSI_COMP_1 0x11, 0x20, 0x01, 0x4E, 0x40
#define RF_MODEM_CLKGEN_BAND_1 0x11, 0x20, 0x01, 0x51, 0x08
#define RF_MODEM_CHFLT_RX1_CHFLT_COE13_7_0_12 0x11, 0x21, 0x0C, 0x00, 0xFF, 0xBA, 0x0F, 0x51, 0xCF, 0xA9, 0xC9, 0xFC, 0x1B, 0x1E, 0x0F, 0x01
#define RF_MODEM_CHFLT_RX1_CHFLT_COE1_7_0_12 0x11, 0x21, 0x0C, 0x0C, 0xFC, 0xFD, 0x15, 0xFF, 0x00, 0x0F, 0xFF, 0xBA, 0x0F, 0x51, 0xCF, 0xA9
#define RF_MODEM_CHFLT_RX2_CHFLT_COE7_7_0_12 0x11, 0x21, 0x0C, 0x18, 0xC9, 0xFC, 0x1B, 0x1E, 0x0F, 0x01, 0xFC, 0xFD, 0x15, 0xFF, 0x00, 0x0F
#define RF_PA_MODE_4 0x11, 0x22, 0x04, 0x00, 0x08, 0x7F, 0x00, 0x0E
#define RF_SYNTH_PFDCP_CPFF_7 0x11, 0x23, 0x07, 0x00, 0x2C, 0x0E, 0x0B, 0x04, 0x0C, 0x73, 0x03
#define RF_MATCH_VALUE_1_12 0x11, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
#define RF_FREQ_CONTROL_INTE_8 0x11, 0x40, 0x08, 0x00, 0x3C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF
#define RADIO_CONFIGURATION_DATA_ARRAY {
0x07, RF_POWER_UP,
0x07, RF_GPIO_PIN_CFG,
0x05, RF_GLOBAL_XO_TUNE_1,
0x05, RF_GLOBAL_CONFIG_1,
0x06, RF_INT_CTL_ENABLE_2,
0x08, RF_FRR_CTL_A_MODE_4,
0x0D, RF_PREAMBLE_TX_LENGTH_9,
0x09, RF_SYNC_CONFIG_5,
0x05, RF_PKT_CRC_CONFIG_1,
0x05, RF_PKT_CONFIG1_1,
0x07, RF_PKT_LEN_3,
0x10, RF_PKT_FIELD_1_LENGTH_12_8_12,
0x0C, RF_PKT_FIELD_4_LENGTH_12_8_8,
0x10, RF_MODEM_MOD_TYPE_12,
0x05, RF_MODEM_FREQ_DEV_0_1,
0x0C, RF_MODEM_TX_RAMP_DELAY_8,
0x0D, RF_MODEM_BCR_OSR_1_9,
0x0B, RF_MODEM_AFC_GEAR_7,
0x05, RF_MODEM_AGC_CONTROL_1,
0x0D, RF_MODEM_AGC_WINDOW_SIZE_9,
0x0F, RF_MODEM_OOK_CNT1_11,
0x05, RF_MODEM_RSSI_COMP_1,
0x05, RF_MODEM_CLKGEN_BAND_1,
0x10, RF_MODEM_CHFLT_RX1_CHFLT_COE13_7_0_12,
0x10, RF_MODEM_CHFLT_RX1_CHFLT_COE1_7_0_12,
0x10, RF_MODEM_CHFLT_RX2_CHFLT_COE7_7_0_12,
0x08, RF_PA_MODE_4,
0x0B, RF_SYNTH_PFDCP_CPFF_7,
0x10, RF_MATCH_VALUE_1_12,
0x0C, RF_FREQ_CONTROL_INTE_8,
0x00
}
const u8 RFM24_CONFIGURATION_DATA[]=RADIO_CONFIGURATION_DATA_ARRAY;
↧
BASCOM-AVR : data problem : REPLY
Hello,
The data Statement just writes the following values to Flash without any "structure". As a programmer you'll have to create/define the structure of the Information yourself. In your example you could do something like this:-
[code:1:8020688e47]
RF_POWER_UP:
data 7,&H02, &H01, &H01, &H01, &HC9, &HC3, &H80
RF_GPIO_PIN_CFG:
data 7, &H13, &H5C, &H53, &H5B, &H51, &H00, &H00
......
restore RF_POWER_UP
read Nr_Of_Bytes_in_Structure
for Data_loop=1 to Nr_Of_Bytes_in_Structure
read Data_byte
'Do something with the data read
next Data_loop
[/code:1:8020688e47]
Regards
Ian Dobson
[/code]
↧
↧
BASCOM-AVR : data problem : REPLY
OK,
It did not look like there was any way to do that, this thread had code similarly from Dave, but I suppose just reaching for something clear, concise and simple.
Thank you Ian and all, for your responses and clarification.
Tim
ps
Would be a really really nice feature though :D
↧
BASCOM-AVR : data problem : REPLY
Hello Tim
I would put this in eeprom
The bytes stored in eeprom will line up with the variable so all I have done is dim the variables in order then load the data into eeprom you can see this in the ENC28J60 webserver project and the 32 x 8 clock where I loaded the characters into the eeprom then you just step through the eeprom bytes you can then change them if need be and not have to write the flash again as they can be changed with a command line
regards Paul
[code:1:80443d2279]
Dim RF_POWER_UP(7) As Eram Byte
$eeprom
Data &H02, &H01, &H01, &H01, &HC9, &HC3, &H80
$data
[/code:1:80443d2279]
↧
BASCOM-AVR : data problem : REPLY
Hi and Thank you Paulvk.
Can you link me to the samples you mentioned?
Thanks again,
Tim
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
[quote:57cdcfb8e8="Visovian"]This makes little sense. SPI mode has nothing to do with COM port.[/quote:57cdcfb8e8]
Manual XMega A
21. USART
21.10 USART in Master SPI Mode
[quote:57cdcfb8e8]With what Avr type?[/quote:57cdcfb8e8]
[quote:57cdcfb8e8]Post subject: [b:57cdcfb8e8]Xmega[/b:57cdcfb8e8] USART in SPI MODE[/quote:57cdcfb8e8]
Exact type of XMega makes not much difference.
I've used it to drive WS2811 via DMA, code to find here in forum.
↧
↧
Share your working BASCOM-AVR code here : Big digits on cheap Lcd loaded from eeprom : NEWTOPIC
Hello. You can run this in simulator to see how this work. Digits running and You can see it all. This is cutted presentation. You can load multiple characters. All readed from eeprom to spare place for code, and data can be edited without flashing micro.
[img:d63f43faa7]http://iv.pl/images/81458173006111921012.jpg[/img:d63f43faa7]
Because I want leave free space on the beginning of eeprom labels dont work fine for me. Maybe I don`t know how to do it :)
I use adresses.
[code:1:d63f43faa7] '*************************************************************
'* BIG FONTS & TEXT STRINGS FROM EE *
'* *
'*************************************************************
$sim ' For the Bascom simulator only
$regfile = "m8def.dat"
$crystal = 8000000
$hwstack = 128
$swstack = 256
$framesize = 256
Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.2 , Db6 = Portc.1 , Db7 = Portc.0 , E = Portc.4 , Rs = Portc.5 'mirley UPT M16
Config Lcd = 16 * 2
Cursor Off Noblink
Dim Pierwsza As Byte , Druga As Byte
Dim Linia_g(10) As String * 3 , Linia_d(10) As String * 3
Dim Hword(2) As Word , T(2) As Word
Dim N As Byte , L(3) As Byte , My_temp As Byte , Address As Word
Dim Temp_text As String * 7
T(1) = 120 'for simulate
T(2) = 100
Gosub Set_characters
Gosub Get_big
Gosub Draw_main
'******************* LOOP START *************
Do
T(1) = T(1) + 10
T(2) = T(2) + 10
If T(1) > 990 Then T(1) = 100
If T(2) > 990 Then T(2) = 100
Gosub Update_main
Waitms 400
Loop
End
'********************* END ******************
Draw_main:
Cls
Restore Piec : Read Address
Readeeprom Temp_text , Address
Lcd Temp_text
Lowerline
Restore Bojler : Read Address
Readeeprom Temp_text , Address
Lcd Chr(0) ; Temp_text ; Chr(126)
Return
Update_main:
Locate 1 , 6
Hword(1) = T(1) / 10
Lcd Hword(1) ; Chr(223) 'pokaz temp. pieca
Hword(2) = T(2) / 10
Pierwsza = Hword(2) / 10
If Pierwsza = 0 Then Pierwsza = 10
Druga = Hword(2) Mod 10
If Druga = 0 Then Druga = 10
Locate 1 , 10
Lcd Linia_g(pierwsza) ; Linia_g(druga) ; Chr(219) 'pokaz temp bojlera
Locate 2 , 10
Lcd Linia_d(pierwsza) ; Linia_d(druga) 'pokaz temp bojlera
Return
Set_characters: 'load special characters to CG-RAM of LCD
My_temp = &H40 'thanks to LUCIANO for code example
!LDS _temp1,{My_temp}
!Rcall _Lcd_control
For Address = 80 To 143
Readeeprom My_temp , Address
!LDS _temp1, {My_temp}
!Rcall _Write_lcd
Next Address
Return
Get_big: 'load sequence special chcaracters for each big font
Address = 144
For My_temp = 1 To 20
For N = 1 To 3
Readeeprom L(n) , Address
Incr Address
Next N
If My_temp <= 10 Then
Linia_g(my_temp) = Chr(l(1)) + Chr(l(2)) + Chr(l(3))
Else
N = My_temp - 10
Linia_d(n) = Chr(l(1)) + Chr(l(2)) + Chr(l(3))
End If
Next My_temp
Cls
Return
'-----------------
' ee address
Piec:
Data 204%
Bojler:
Data 212%
Pompa:
Data 220%
Alarm:
Data 226%
Wyjsc:
Data 232%
Tryb:
Data 237%
Lato:
Data 242%
Zima:
Data 248%
Nadmuch:
Data 255%
Przer:
Data 263%
'-----------------
$eeprom
Data 0 , 0 , 200 , 0 , 34 , 3 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 32 , 14 , 4 , 20 , 30 , 17 , 16 , 32 ' kranik
Data 28 , 24 , 32 , 32 , 32 , 32 , 24 , 28 ' prawy naroznik
Data 31 , 31 , 32 , 32 , 32 , 32 , 32 , 32 ' gorna kreseczka
Data 32 , 32 , 32 , 32 , 32 , 32 , 31 , 31 ' dolna kreseczka
Data 31 , 31 , 32 , 32 , 32 , 32 , 31 , 31 ' dwie kreseczki
Data 28 , 30 , 30 , 30 , 30 , 30 , 30 , 28 ' prawa belka
Data 7 , 15 , 15 , 15 , 15 , 15 , 15 , 7 ' lewa belka
Data 7 , 3 , 32 , 32 , 32 , 32 , 3 , 7 ' lewy naroznik
Data 254 , 254 , 5 , 7 , 4 , 5 , 254 , 4 , 5 , 6 , 3 , 5 , 6 , 4 , 1
Data 6 , 4 , 1 , 6 , 2 , 5 , 6 , 4 , 5 , 6 , 4 , 5 , 6 , 2 , 5 'linia_g(1-10)
Data 254 , 254 , 5 , 6 , 3 , 3 , 254 , 3 , 5 , 254 , 254 , 5 , 3 , 3 , 5
Data 6 , 3 , 5 , 254 , 254 , 5 , 6 , 3 , 5 , 3 , 3 , 5 , 6 , 3 , 5 'linia_d(1-10)
Data "PIEC:--"
Data " BOJLER"
Data "Pompa"
Data "Alarm"
Data "Exit"
Data "Tryb"
Data "letni"
Data "zimowy"
Data "Nadmuch"
Data "Przerwa"
$data[/code:1:d63f43faa7]
Thanks for Paulvk and Luciano
↧
BASCOM-AVR : data problem : REPLY
Thanks Paul,
Interesting idea, I will consider that option.
Mark, MWS
Thanks for the look inside bascom. Mostly over my head but very interesting.
Dave
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
Devices like the Mega1284 also have Uarts with SPI mode it would be nice not to switch from SD card to Wiznet W5100 but Bascom does not support this yet.
Regards Paul
↧
Share your working BASCOM-AVR code here : Big digits on cheap Lcd loaded from eeprom : REPLY
Hello EDC
Did you have a look at AN#196 where I used eeprom for character rom ?
To leave space at the front of eeprom I would dim an eeprom variable eg I want 5 bytes of eeprom free
When you dim eram variables they use eeprom in the order they are dimensioned in the code
So if I dim a variable with 5 bytes then one with 20 bytes and then another with 7 bytes
the first uses the first 5 eeprom bytes
the next uses the next 20 eeprom bytes
the third uses the next 7 eeprom bytes
Data will load from the start of the eeprom so by counting bytes you can line up the eeprom variables with the data
Here I reserve 5 bytes of eeprom then load values into them for later use later eeprom Dim,s use byte 6 ,7 >
Regards Paul
[code:1:e21b7166dd]
dim spare(5) as eram byte
dim...
dim...
$eeprom
Data 0, 20 , 0 , 16 , 5
'then rest of data
Data .......
Data .....
$data
[/code:1:e21b7166dd]
↧
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
Hi All!
Thanks MWS for the tip! :idea:
[quote:072e7db019="Paulvk"]Devices like the Mega1284 also have Uarts with SPI mode it would be nice not to switch from SD card to Wiznet W5100 but Bascom does not support this yet.
Regards Paul[/quote:072e7db019]
BASCOM-AVR Help Reference
Version 2.0.7.7 document build 52
Section - CONFIG COMx
Remarks Xmega
mode:
[i:072e7db019]The USART mode, this can be :
- ASYNCHRONEOUS or 0 (default) for asynchronous operation.
- SYNCHRONEOUS or 1 , for synchronous operation.
- IRDA or IRCOM for IRDA operation
[b:072e7db019]- SPI or MSPI for operation as SPI controller[/b:072e7db019][/i:072e7db019]
This is not supported? :?:
Mark it works without asm insertion?
Description mode and have no examples.
Thank you all for your help,
Ruslan.
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
[code:1:799bc35070]$Regfile = "xm128a1def.dat"
$Crystal = 32000000
$hwstack = 32
$swstack = 8
$framesize = 24
Config Osc = Enabled , 32mhzosc = Enabled
Config Sysclock = 32mhz
Config Com1 = 250000 , mode = SPI , Databits = 8
'Config Com2 = 250000 , mode = SPI , Databits = 8
'Open "com2:" For Binary As #1
Dim B As Byte
B = 1
Do
Printbin B
'Printbin #1 , B
Incr B
Waitms 500
Loop
'Close #1[/code:1:799bc35070]
↧
BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY
Print works.
And how to read?
INPUT ????
↧