As I cannot see the actual code changes made in the .H file. I am not what is happening but the correct sytnax would be #DEFINE SER1_TXDELAY 1 ms. Note SER1 is used not SERR1 and the 1 ms.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Many Thank's Evan,
Case Closed!
(my mistake), back to normal, (with your modif for softserialch1.h)
my regards.
did the test with "#DEFINE SER1_TXDELAY 1"
and it's running fast and accurate for all 4 x lines x 20 chr.
for "ser1send" and "Ser1Print"
;Ser1Print"ABCDEFabcdef"TEST;workok;#option explicit#chip tiny10, 1 ;1Mhz only#DEFINE SYSDEFAULTCONCATSTRING 0;-----Includelibrary#include<SoftSerial.h>;-----ConfigSerialUARTforsending:#define SER1_BAUD 4800 ; baudrate must be defined#define SER1_TXPORT PORTB ; I/O port (without .bit) must be defined#define SER1_TXPIN 0 ; portbit must be defined#define SER1_INVERT On ; Polarity inverted On/Off#DEFINE SER1_TXDELAY 1 ; Tx delay for String.pause50ser1send255ser1send8;LCDBackLightOndopause500ser1send254;mustclearLCDfirstser1send1;pause50ser1send254ser1send128;Line1Ser1Print"ABCDEFGHIJKLMNOPQRST"ser1send254ser1send192;Line2Ser1Print"12345678901234567890"ser1send254ser1send148;Line3Ser1Print"abcdefghijklmnopqrst"ser1send254ser1send212;Line4Ser1Print"stuvwxyz()*<>?,./+[]"loop
Please upload your revised .H to this thread. I will update the Master code based. I will also update the Help.
Else, you will lose these changes in the next release.
Note. When you get the next update of GCSTUDIO your changes may be overwritten. So, save the .H somewhere safe ( another folder), update GCSTUDIO and then put your adapted .H back.
Re code. Very nice and clean. And, we now know it woks on real silicon. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did what your recommended as for saving the .H file before any update, then started GCStudio, then the automatic update , and tried to compile again the latest code, and I've got a Text scrambling LCD see pic.
Then I copy the .H file back , re-compile and everything is working
27/04/2025 1387 New RS232 N/A Yes PIC/AVR/LGT Completed New: Add SerNDelay to routines to improved for serial devices that required intra byte processing time.[]
Your name is now added to the GCBASIC contributors.
Thank you.
Last edit: Anobium 2024-04-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've edited the "SoftSerialch1.h" as thinking for a greater control over the delay between sent bytes.
What is your opinion, and could this be of any help.
Thanks.
In the .h file I used this:
'#IFDEF Ser1_TXDELAYus
wait Ser1_TXDELAYus us
#ENDIF
#IFDEF Ser1_TXDELAYms
wait Ser1_TXDELAYms ms
#ENDIF
In GCStudio:
; ----- Config Serial UART for sending:
#define Ser1_BAUD 4800 ; baudrate must be defined
#define Ser1_TXPORT PORTB ; I/O port (without .bit) must be defined
#define Ser1_TXPIN 0 ; portbit must be defined
#define Ser1_INVERT On ; Polarity inverted On/Off
;#define Ser1_TXDELAY 250 ; Tx delay
;#define Ser1_TXDELAYms 1 ; Tx delay
;#define Ser1_TXDELAYus 250 ; Tx delay
I think you are confused.
Ser1Print 254 or Ser1Print 128 will send the byte value as string.
Ser1Send 254 or Ser1Send 128 will send the raw number.
I guess I can use it as it is.
Also I made a mistake while writing the code :
omit the "ms" after "#DEFINE Ser1PrintInterCharDelay"
Last edit: JB 2024-04-27
As I cannot see the actual code changes made in the .H file. I am not what is happening but the correct sytnax would be
#DEFINE SER1_TXDELAY 1 ms
. Note SER1 is used not SERR1 and the1 ms
.Many Thank's Evan,
Case Closed!
(my mistake), back to normal, (with your modif for softserialch1.h)
my regards.
did the test with "#DEFINE SER1_TXDELAY 1"
and it's running fast and accurate for all 4 x lines x 20 chr.
for "ser1send" and "Ser1Print"
Last edit: JB 2024-04-27
Please upload your revised .H to this thread. I will update the Master code based. I will also update the Help.
Else, you will lose these changes in the next release.
Note. When you get the next update of GCSTUDIO your changes may be overwritten. So, save the .H somewhere safe ( another folder), update GCSTUDIO and then put your adapted .H back.
Re code. Very nice and clean. And, we now know it woks on real silicon. :-)
here's the edited softserialch1.h
I did what your recommended as for saving the .H file before any update, then started GCStudio, then the automatic update , and tried to compile again the latest code, and I've got a Text scrambling LCD see pic.
Then I copy the .H file back , re-compile and everything is working
Thank you Evan for the excellent support.
Last edit: JB 2024-04-28
Thank you.
I have updated Ser1, Ser2 and Ser3 with the same approach.
I have updated the Help also. See https://github.com/GreatCowBASIC/Help/blob/main/source/relevantconstants3.adoc
Build 1387 will have this new feature.
27/04/2025 1387 New RS232 N/A Yes PIC/AVR/LGT Completed New: Add SerNDelay to routines to improved for serial devices that required intra byte processing time.[]
Your name is now added to the GCBASIC contributors.
Thank you.
Last edit: Anobium 2024-04-28
Also my BitDefender found something about "GCBasicFloatCalculator.exe"
Last edit: JB 2024-04-27
This is a false positive. Add, an exclusion to the checker.
The program was specifically written in assembler for GCBASIC. We plan to rewrite in C to enable code signing in the near future.
and this
Good News..
Thanks again Evan, for your help.
@JB See https://sourceforge.net/p/gcbasic/discussion/579125/thread/8ddc9b892e/?page=2#3c70
Hello,
I've edited the "SoftSerialch1.h" as thinking for a greater control over the delay between sent bytes.
What is your opinion, and could this be of any help.
Thanks.
In the .h file I used this:
'#IFDEF Ser1_TXDELAYus
wait Ser1_TXDELAYus us
#ENDIF
#IFDEF Ser1_TXDELAYms
wait Ser1_TXDELAYms ms
#ENDIF
In GCStudio:
; ----- Config Serial UART for sending:
#define Ser1_BAUD 4800 ; baudrate must be defined
#define Ser1_TXPORT PORTB ; I/O port (without .bit) must be defined
#define Ser1_TXPIN 0 ; portbit must be defined
#define Ser1_INVERT On ; Polarity inverted On/Off
;#define Ser1_TXDELAY 250 ; Tx delay
;#define Ser1_TXDELAYms 1 ; Tx delay
;#define Ser1_TXDELAYus 250 ; Tx delay
Last edit: JB 2024-05-04
I would need to actual .h file. Then, I can compare to the change I uploaded the other day.
I would need to actual .h file. Then, I can compare to the change I uploaded the other day.
here's the "SoftSerialch1.h"
Here at the released files. I have updated to support the constants you added.
All three are updated.
I have updated the Help, again. See the bottom of the table https://github.com/GreatCowBASIC/Help/blob/main/source/relevantconstants3.adoc
Update you installation with these three files.
The constants are:
SER1_TXDELAY, SER2_TXDELAY, SER3_TXDELAY
SER1_TXDELAYms, SER2_TXDELAYms, SER3_TXDELAYms, same as SERn_TXDELAY
SER1_TXDELAYus, SER2_TXDELAYus, SER3_TXDELAYus
Many Thanks for the great support.