Hi,
Add a ; at the end of you print statement then bascom won't send a CR LF. You'll have to add the "0A" yourself, something like
[code:1:598d3a877f]
print "MESSAGE *; CHR(&H0A);
[/code:1:598d3a877f]
Regards
Ian Dobson
↧
BASCOM-AVR : Software Uart CrLf question : REPLY
↧
BASCOM-AVR : Software Uart CrLf question : REPLY
Hi,
see the help about[b:9329d0d166] UART[/b:9329d0d166] everything is explain :
take care at :
OVERVIEW
Here are some other commands that you can use for UART communications:
Waitkey()
Waitkey will until a character is received in the serial buffer.
Ischarwaiting() [b:9329d0d166] VERY USEFUL commands[/b:9329d0d166]
Returns 1 when a character is waiting in the hardware UART buffer.
Inkey()
Inkey returns the ASCII value of the first character in the serial input buffer.
Print
Sends a variable or non-variable string to the UART
JP
↧
↧
BASCOM-AVR : Software Uart CrLf question : REPLY
[quote:d238bc31ab="i.dobson"]Add a ; at the end of you print statement
[code:1:d238bc31ab]
print "MESSAGE *; CHR(&H0A);
[/code:1:d238bc31ab][/quote:d238bc31ab]
and don't use asterisks instead of inverted commas :D
↧
BASCOM-AVR : Software Uart CrLf question : REPLY
[quote:448e9382db]Add a ; at the end of you print statement then bascom won't send a CR LF. [/quote:448e9382db]
You right, thanks!
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
@Mark
can you confirm, that DHCP Sample isn't working on WIZ5500 ?
best, Michael
↧
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
no, i did not test it on all supported wiz chips. So i can not confirm if it works or not.
it should work but since wiznet makes each new chip totally different, it would not surprise me if there is some difference.
A csw_reset (soft chip reset) is executed, it should be sufficient.
↧
Share your working BASCOM-AVR code here : 16x32 RGB LED matrix panel : REPLY
Hi,mansur
I do not understand the meaning of the question.
What help do you need?
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
thank you Mark!
@katipefendi
check hint from Mark! (csw_reset)
↧
BASCOM-ARDUINO : SSD1306 Oled I2c 0.96 inch : REPLY
Hello,
I have a problem with compiling the [i:3a42e79007]Test SSD1306 buffered.bas[/i:3a42e79007] (glcdSSD1306-I2C-Buf.lib). I have Bascom 2.0.8.0.
I threw the library glcdSSD1306-I2C-Buf.lib into C: Program Files (x86) MCS Electronics BASCOM-AVR LIB,
Open from glcdSSD1306-I2C-Buf.zip [i:3a42e79007]Test SSD1306 buffered.bas[/i:3a42e79007], press F7 and...
error:
[i:3a42e79007]Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
Error : 1 Line : -2003 Unknown statement [RCALL _UPDATE_SCREEN] , in File : C:PROGRAM FILES (X86)MCS ELECTRONICSBASCOM-AVRLIBGLCDSSD1306-I2C-BUF.LIB
[/i:3a42e79007]
Could someone compile the [i:3a42e79007]Test SSD1306 buffered.bas[/i:3a42e79007] in the latest Bascom?
https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=download&id=3783
thank you
↧
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
I connected the w5500 and while the provided samples work, indeed the Settcp hangs the chip.
After checking it seems that the w5500 register does not reset properly.
According the datasheet : If this bit is 1, All internal registers will be initialized. It will be
automatically cleared as 0 after S/W reset.
So at init and re init the bit is set, then there is a check to see if the bit clears. With a hard reset this seems to work, while with a soft reset, it doesnt.
To fix it, you can remark these lines in the tcpip-w5500.LBX file (open with nodepad)
Search the label _Re_init_tcpip_lp: and remark the lines as shown :
_Re_init_tcpip_lp:
; rcall _read_TCPSPIX
;.OBJ FCD7
; rjmp _Re_init_tcpip_lp
then save.
↧
BASCOM-ARDUINO : SSD1306 Oled I2c 0.96 inch : REPLY
All strings "RCALL _UPDATE_SCREEN" in library must be changed to "gosub _UPDATE_SCREEN".
↧
BASCOM-ARDUINO : SSD1306 Oled I2c 0.96 inch : REPLY
Compilation without errors!
Thank you.
↧
BASCOM-AVR : How to get bytes count when use inputbin? : NEWTOPIC
Can I get how many bytes income when use inputbin? :shock:
[b:d899e121ba][color=red:d899e121ba](BASCOM-AVR version : 2.0.8.1 )[/b:d899e121ba][/color:d899e121ba]
↧
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
Thanks a lot Mark!
↧
EASY TCP/IP : I think, Config TCP is not confortable with W5500 : REPLY
you are welcome.
today i checked the register value and it remains &H80.
So the bit never clears as the datasheet suggests. probably a bug in the w5500 chip.
Since there is a delay built into the lib i now removed the check of the status bit.
↧
BASCOM-AVR : How to get bytes count when use inputbin? : REPLY
[quote:53310cd955="ericc0922"]Can I get how many bytes income when use inputbin?[/quote:53310cd955]
How many bytes already came in? No.
How many bytes will have to come in? Yes.
↧
BASCOM-AVR : How to get bytes count when use inputbin? : REPLY
[quote:a4ff14a6a7="MWS"][quote:a4ff14a6a7="ericc0922"]Can I get how many bytes income when use inputbin?[/quote:a4ff14a6a7]
How many bytes already came in? No.
How many bytes will have to come in? Yes.[/quote:a4ff14a6a7]
:P Yes, I mean how many bytes already came in?
Sorry about my poor English... :oops:
↧
↧
BASCOM-AVR : How to get bytes count when use inputbin? : REPLY
[quote:855937af0b="ericc0922"]Yes, I mean how many bytes already came in?[/quote:855937af0b]
Even if this info would be available somewhere, how it would help you?
Inputbin() does not return until the predefined or user-defined amount of bytes came in.
If you read into a DWord, Inputbin() returns after receiving 4 bytes, but not after 3, which means you can not execute user code as long Inputbin() waits for the 4th byte.
The only use I can imagine for such is to combine it with $Timeout to check how many bytes came in till timeout. No such info is provided afaik for Inputbin(), which does not mean it does not exist within a register after return.
But before checking for, and using an unsafe method, it's easier to write a custom routine, which does exactly what's requested.
↧
BASCOM-AVR : rfid pn532 : REPLY
Hello,
I know from datasheet that pn532 has an address &H48. I also have it proven by i2c scanner.
So I thought that simply frame may look like:
asking:
response:
[code:1:f669753686]
' Ask for firmware version
I2cstart
I2cwbyte &H48 'i2c address
I2cwbyte &H02 'function getFirmawareVersion command - datasheet
I2cstop
Waitms 5
'get response with firmware version
I2cstart
I2cwbyte &H48
I2crbyte FV, Nack 'THERE Should be whatever
I2cstop
Print hex(FV)
[/code:1:f669753686]
FV=48H but this my address and if I change address into new, always I get FV=new address.
Is an idea of i2c described in the above code correct?
Martin
↧
BASCOM-AVR : rfid pn532 : REPLY
[quote:0e4bae5d36="krolikbest"]that pn532 has an address &H48[/quote:0e4bae5d36]
Bascom I2C commands require addresses in 8-bit format including the r/w bit, while usually addresses are given as 7 bit.
Additionally the shown code does not resemble a proper way to do an I2C-read.
Where's the read-address for example? Learn some basics about I2C communication first.
↧