Micro SD Card as Arduino "main memory" - memory

I would like to know if it is possible to store font code in a Micro SD card and then, afterwards, access this code to run the routines.
I'm doing some stuff with Arduino nano and due to the amount of sensors and components, I'm having problems with memory. It is causing an instability that might affect things to work properly.
Any suggestions?

The best suggestion that I can give you, is switch to an Arduino Mega, or an Arduino Due.
If you are not open to that solution, then things are going to be rough.
What you will need to do, is write a bootloader, which is able to read from the memory card and change the flash contents of your Atmega.
What this essentially means is that you have to write an OS level program for your Arduino Bootloader, and use the memory card like a hard-disk and the rest of your Arduino flash as the program RAM.
I hope this helps, good luck.

Nitro, Gerhard and datafiddler,
My problem was solved by a simple code optimization. I'm new to this Arduino world and so I was using a lot of unnecessary stuff.
I appreciated the help provided. Thanks!

Related

Simple memory monitor for iOS

I have zero iOS programming experience but I'm good with Android and Java programming. I also know my basics in C++. Here's what the app needs to do:
List out all the current running apps in the phone and display how much Ram each is consuming.
Put the ram usage by each app onto the Logger.
That's it.
It's simple enough and I've read up as much as I can about Objective C and Swift (I can use either) and I've found an interesting tool here that does something similar to what I need to do.
If any of you can give me any advice I'd be forever in debt as I really need to get this done well. If you need anything else, let me know. Thanks a bunch.
Edit: to make myself clear, I'm only asking if this is even possible in iOS and what approach I may take and if there are any tools you recommend. I'm not asking anyone to do this for me.

Read the memory in a FPGA

I'm using a de0-nano board with an Altera Cyclone IV FPGA. My design has a hardware part and a software one. The hardware one is implementing a qsys project with a Nios II cpu that is running the software part. The qsys project has a dual-port memory. One port is connected to the cpu and the other is exported so the hardware can write to it.
My design is not working as I want. I don't know whether it's because of the hardware or the software so I'd like to read the memory by another way and I don't know which tool I can use.
If someone can help me...
I think you can use Insystem Memeory Content Editor in Quartus to read the content inside Block Ram.It will work from Cyclone III family. But no problem you are using Cyclone IV

bluetooth communication in nxj

I'm nxj beginner.
I have some questions about bluetooth communication between PC and brick.
First, when bluetooth communication occurs, where is the birthplace processing this datas?
In other words, I want to know whether these datas will be processed on CPU or brick.
Second, what is exact roles CPU and brick in bluethooth communication?
That means what is processed on CPU and what is processed on brick.
I have searched almost web site but I can't find this anywhere.
Please help me. Thanks.
You can see it in the package structure.
lejos.nxt.*
This package contains classes running on the NXT-brick. All code in this package will be compiled for the brick and will run on the brick.
lejos.pc.*
Here the difference is not that clear. This is java-code you compile for personal computer. So most code runs on your computer. But some classes (e.g: RemoteMotorController) only send messages to the NXT-brick which gives commands to the motors.
lejos.pc.comm provides API's that allow you to communicate/control the nxt robot from the PC.
When importing the the libs to an Android project, it allows you to build an instance of the same environment used on a pc, but within android.
I agree it can be tough finding some things out. It would be great if there was as stronger lejos presence on SO
This question is months old and has remained un-answered I actually have a lot of questions about it myself, but I might be able to provide some insight for utter novices.
when using bluetooth with Android and NXJ robots, you use either lejos.pc.comm or lejos.NXJ.
Both provide APi's to do almost the same thing, but work a little differently. I don't know nearly enough about the NXJ api, but I do know that it is the one that lets you manipulate the robot much more effectively, such as outputting data to it's LCD screen, which you can't do with the pc.comm api
As far as I can tell, the pc.comm API uses both Android Bluetooth API's and it's own protocols to allow communication with Lego LCP commands.
(I want to come back to this, but I'm writing a dissert on the topic so I'll try to update it in a couple of days. Seems not many are interested though, shame)

how to prevent that the OS or other programs writes on a storage device in the same time as my program does

I'm a Delphi programmer.
I want to fill the entire free space of a storage device with dummy file(s).
During this operation I want to prevent that Windows or other programs write on the device.
I know it is doable because I have seen programs that do it.
I already have the code to create the dummy files (using TFileStream, very fast on NTFS) so all I need is some sort of lock/unlock code.
Does someone know a way..?
Thank you for any suggestion.
I will accept even solutions that will change the way I create those files, provided that the entire program will work better.
Thank you.
Best regards, John.
There's a SetEndOfFile function which is presumably transactional (i.e. it either succeeds or fails), which I think (I haven't tested/checked it) you can use to grow a file to fill available space.

Printing from an embedded system

We are making a lab instrument using an ARM9/RTOS system. The client has asked about printing simple reports from the ARM9 system. In this case, we have USB Host support in the RTOS. I'm thinking about printing bitmaps in generic PCL, hoping that will cover the widest range of printers. Is there a better way to approach this? I'm assuming the RTOS does not have printer drivers, and I don't want to support a lot of printers.
We also support USB device mode on our system, so you could plug in a photo printer, and our device would appear to be a USB stick. So that would work, but it's a bit clunky. This will be a C/C++ embedded system
Pretending to be a digital camera and interfacing with a PictBridge printer actually sounds pretty clever. It would remove the need to deal with different printer drivers, and if my understanding of the technology is correct, you could even control the operation of the printer right from your device.
On the other hand, as someone who has used a fair number of computerized lab instruments (oscilloscopes etc.) I find the ability to save screenshots from an ethernet/web interface to be much more useful. Print is dead.
Have you looked at what all the scope vendors are doing? They all have print options (I think) and I don't know what they are doing to solve this problem.
Last time I was involved with something like this, we used serial ports to talk to HP printers using PCL. That backfired as everyone quickly stopped making serial printers!
PostScript is natively supported by most printers, so you could just send it over the wire, but it would be a lot more cumbersome than straight ASCII. There are libraries, but they're bulky.
Since your device can appear to be a USB stick, a simple solution would be to generate a report as a JPEG image and then have the printer open and print it. This way, the people who want paperless output can use the image as-is, and everyone else can print it.
If I understand you correctly, you could write a formatted text file and do a "print" command through Windows in the "usb stick" mode.
For a simple report, it would be best to stick to straight ASCII. If you need some graphics, PCL would be a good choice for B/W laser printers, but I'm not sure how universal it would be for the more common ink-jet printers.
Edit: the PCL Reference Manual is available as a PDF from HP.

Resources