Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:45 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM: help needed

Author Message
Juri74

Senior Member

Joined: 06/02/2012
Location: Italy
Posts: 162
Posted: 02:16am 16 Apr 2013
Copy link to clipboard 
Print this post

hello all..
i'm experiencing troubles with file management with color maximite / ubw32
i do not know if it's a bug or if my ubw32 have problems so i'll post a test program here asking some help, try it and let me know if your maximite will reboot without any reasons..

i attach a zip file containing the test.bas file and a jpg file called "fridge.jpg"

all you have to do is to run the test program, give for input file the "fridge.jpg" and any name for output file..
you can use any other files but i encouter that fault with files bigger than 2kb

Input "infile";a$
Input "outfile";b$
Open a$ For input As 1:Open b$ For output As 2
x=0
Do
x=x+1:t$=Input$(1,#1):Print #2,t$;
Print @(0,0)"bytes processed";x;Space$(20)
If Eof(1)=-1 Then Close 1:Close 2:End
Loop


the program simply copy the input file to output file byte by byte..
thank you..
Juri
2013-04-16_121454_Test.zip
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6099
Posted: 01:01pm 16 Apr 2013
Copy link to clipboard 
Print this post

I have changed your test.bas slightly to speed up the process.
Input "infile";a$
Input "outfile";b$
Open a$ For input As 1:Open b$ For output As 2
x=0
cls
Do
x=x+1:t$=Input$(1,#1):Print #2,t$;
if (x mod 100) = 0 then Print @(0,0)"bytes processed";x;Space$(20)
If Eof(1)=-1 Then exit
loop
Close 1:Close 2
Print @(0,0)"bytes processed";x;" All completed!"
end


Printing every 100 bytes makes a big difference to the time taken

I have run the program 6 or 7 times so far without any problems.

Using a UBW32 with MM Basic V4.3a and connected to a PC rather than a keyboard and screen.

The schematic shows a 2.2 ohm resistor between 3.3V and pin 4 of the SD card holder.
There was some discussion about this resistor and I think some users had more success if this resistor was replaced with a link.

I would certainly try a different brand of SD card.

Jim

VK7JH
MMedit   MMBasic Help
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024