Hi Matt
I think this is a question for you. You made a beautiful sample for writing
to a sd card.
Every start of the program I use the part of your lib to control the
connection to the sd card.
I can write and read the sd card byte for byte. I use a bitmap image of
Marilyn Monroe of 504 bytes.
The half of the next program works perfect:
var byte gegeven
var byte data
var word step1
var word teller
sd_start_write(50)
for count(marilyn) using teller loop
sd_data_byte = marilyn[teller]
end loop
sd_stop_write
This works perfect.
I also tried to write to the sd card with a 'sector buffer' because most
arrays are larger.
But first the array of Marilyn. It can be written in one sector.
Attempt 1:
print_string(serial_data, "Writing to sector 100")
print_crlf(serial_data)
sd_start_write(100)
--fill the sector buffer
for 512 using teller loop
sd_sector_buffer[teller] = marilyn[teller]
end loop
-- write the sector buffer to sector 100
sd_write_sector_address(100)
sd_stop _write
I also tried:
Attempt 2:
sd_start_write(150)
for 512 using step1 loop
gegeven = marilyn[step1]
sd_sector_buffer[step1] = gegeven
end loop
-- write the sector buffer to the sd card
sd_write_sector()
sd_stop _write
Both attempts does not work.
I get rubbish when I read the sectors.
Can you tell me how I get it working.
Regards,
Peter
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jallib/d55a711f-2d70-4690-be7b-08d123dad47bn%40googlegroups.com.