View previous topic :: View next topic |
Author |
Message |
MichaelB.
Joined: 04 May 2017 Posts: 58
|
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jul 24, 2019 7:06 pm Post subject: |
|
|
instead of using $bgf, have a look at $INC which can binary include a file with a label and size.
sending can be done with printbin or when using print make sure you use : print chr(ar(x));
thus chr() function to send as binary, and ; to suppress CR + LF
then you need to alter the driver for the lcd. instead of getting it from eeprom or ram, use waitkey() _________________ Mark |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Wed Jul 24, 2019 7:40 pm Post subject: |
|
|
albertsm wrote: | instead of using $bgf, have a look at $INC which can binary include a file with a label and size.
sending can be done with printbin or when using print make sure you use : print chr(ar(x));
thus chr() function to send as binary, and ; to suppress CR + LF
then you need to alter the driver for the lcd. instead of getting it from eeprom or ram, use waitkey() |
Sounds very good too.
This will take me to the next question.
Now when i Save the incomming Data from the Picture, how can i use SHOWPIC from a Custom Memory location? How does it look like?
Like:
SHOWPIC 0 , 0 , &h00 to &h006 ' ? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jul 24, 2019 8:08 pm Post subject: |
|
|
please read the help. there is no option to show from a custom location. and this is a for a reason : you dont have enough space to store the picture in memory. _________________ Mark |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Wed Jul 24, 2019 8:52 pm Post subject: |
|
|
albertsm wrote: | please read the help. there is no option to show from a custom location. and this is a for a reason : you dont have enough space to store the picture in memory. |
Hi albertsm
i read the help, this is why i am here.
albertsm wrote: | there is no option to show from a custom location |
Can you make a Language Statement like:
SAVE ByteIncomingPicture(6) as BGF at &h268!4OW3ß8 ?
TestPicture = &h268!4OW3ß8
SHOWPIC 0 , 0 , Testpicture
This would be awesome.
best regards |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Jul 25, 2019 9:27 am Post subject: |
|
|
MichaelB. wrote: |
i read the help, this is why i am here.
|
ok i ask because you ask : Quote: | Now when i Save the incomming Data from the Picture, how can i use SHOWPIC from a Custom Memory location? How does it look like?
Like:
SHOWPIC 0 , 0 , &h00 to &h006 ' ? |
Which is nowhere described in the help.
I already provided a simple method to send a BGF file, or actually any (binary) data you have. $INC can store a label and size. And it is simple to read and send this data. you should try it.
Only the 'other side' is more work. Either alter the lib (i do not know which driver/lcd you use) and receive direct. Or make 2 steps : receive the data. Then show from memory.
I am willing to make a change to support loading from SRAM. But you need to understand that bgf files can be big in size. Depending on LCD and image. If your biggest bgf file is 8KB, you need a buffer of 8 KB !
Most chips do not have that size. So before i do a lot of work : change compiler, drivers, documentation, testing. Make sure that this is usable. I dont want to work on features that are never used.
When using direct com, there is no limit in size since data is sent byte after byte. but you need some handshake to make sure all is kept in sync. _________________ Mark |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Thu Jul 25, 2019 10:17 am Post subject: |
|
|
[quote="albertsm"] MichaelB. wrote: |
I am willing to make a change to support loading from SRAM. But you need to understand that bgf files can be big in size. Depending on LCD and image. If your biggest bgf file is 8KB, you need a buffer of 8 KB !
Most chips do not have that size. So before i do a lot of work : change compiler, drivers, documentation, testing. Make sure that this is usable. I dont want to work on features that are never used.
When using direct com, there is no limit in size since data is sent byte after byte. but you need some handshake to make sure all is kept in sync. |
This sound awesome.
The Recieving MCU using a E32 TTL100 RF Module:
Code: | $regfile = "m128def.DAT"
$crystal = 7372800
$baud = 19230
$eepleave
'$loadersize = 512
$hwstack = 100
$swstack = 200
$framesize = 200
$Timeout = 100
$lib "glcdKS108.lib" ' KS-108 controler
'$Sim
Config Graphlcd = 128 * 64sed , Dataport = Porta , Controlport = Portc , Ce = 0 , Ce2 = 1 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4
Const Serout_extpull = 0
Config Serialout = Buffered , Size = 20
Config Serialin = Buffered , Size = 20
Do
Bitwait Pine.2 , Set
Input DataInput Noecho
' << and save here the Incomming Picture data to show later with SHOWPIC >>
Loop
End |
and an amount BGF Files after the END, that already exist during Compile
Code: | The Sending MCU using a E32 TTL100 RF Module:
$regfile = "m32def.dat"
$crystal = 16000000
$baud = 19230
$hwstack = 30
$swstack = 30
$framesize = 40
$Timeout = 20
Wait 2
Config Lcdbus = 4
Config Lcdpin = Pin , Db4 = Portb.3 , Db5 = Portb.2 , Db6 = Portb.1 , Db7 = Portb.0 , E = Portb.4 , Rs = Portb.5
Config LCD = 16 * 4
Const Serout_extpull = 0
Config Serialin = Buffered , Size = 20
Config Serialout = Buffered , Size = 20
Do
>> Print BGF <<
Loop
End
|
PS: Certainly i will cost me this a bit, maybe 10 or 20 Euro via Paypal |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Thu Jul 25, 2019 10:52 am Post subject: |
|
|
Hi Michael,
the above code doesn't really solve anything.
do you want to receive data from bgf file and immediately write it to Display?
otherwise where's your buffer for incoming huge data?
...or did you want someone to supplement your code fragments above?
... which probably will not happen
_________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Thu Jul 25, 2019 11:55 am Post subject: |
|
|
six1 wrote: | Hi Michael,
the above code doesn't really solve anything.
do you want to receive data from bgf file and immediately write it to Display?
otherwise where's your buffer for incoming huge data?
...or did you want someone to supplement your code fragments above?
... which probably will not happen
|
I want to Recieve a BGF File and want to Store it in the eeprom, and have access when it need to be Shown.
Quote: | where's your buffer for incoming huge data? |
What do you mean? Serialin and out are Buffered with the Size of 20. Which i must increase when its nessesary. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Jul 25, 2019 12:08 pm Post subject: |
|
|
while memory of processor is limited, the EEPROM is certainly limited.
do you already have these bgf files? and what is the byte size of the biggest one? _________________ Mark |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Thu Jul 25, 2019 1:07 pm Post subject: |
|
|
albertsm wrote: | while memory of processor is limited, the EEPROM is certainly limited.
do you already have these bgf files? and what is the byte size of the biggest one? |
The biggest BGF of my 137 Pictures in my Project have 987 Bytes (this is the MainMenu Picture with a bunch of Details).
The Most of all other ranges from around 50 to 200 Bytes.
I havent done yet some Pixelwork for the Transmitting Picture, because iam working currently on some Idleing Animations with Pset ,until a "Confirmed" String is Recieved.
I can send you a Similar BGF with the same Dimensions of my already using Submenu´s.
The Picture is 64x32 with 238 Bytes
Edit: there is a Permission, i can not tke a BGF in the attachment here. |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Thu Jul 25, 2019 8:01 pm Post subject: |
|
|
When ive read :
MichaleB wrote: | ..(witch can show the BGF file) |
I was think that you have the receiver side done
..and, ofcourse I made mistake in my code. Should be "Printbin" instead "Print". That`s why you see ascii representations of the values.
You must know that BGF must be decompressed by sender and this is some time consuming but spare some flash space.
If you have space in flash then indeed bin file, like Mark propose, will be quicker. |
|
Back to top |
|
|
|