Hi Everyone!
I've been using PICAXE for a relatively long time now, and am really finding alot of enjoyment and inspiration in it. I've made a fair few successful projects, and am now planning on the following! This is my first post to the PICAXE forum so bear with me if I seem a little green to you guys!
Basically I want to create a datalogger, using the normal readadc10 command and related potential divider circuit etc, the usual sort of set up.
I then want to output the ADC results to a USB pen drive through the vDrive2 module, using a variation of profmason's sample code. This will use the normal hserout commands etc.
All this seems ok, the catch comes here. I want to be running the PICAXE at 8MHz, and want to read the ADC (10 bit) pin over a period of 1 second. I will be using the minimal amount of code during the ADC scanning loop, ie read the ADC and then write to the USB drive, then repeat. But I also need the data to be read and then written to the USB drive at a rate as close as possible to 8MHz. Obviously time will be lost when reading the ADC pin and then output to the USB, but I was hoping that it would be minimal, as I couldn't find any official times that these instructions take. I can make the PICAXE run at 16MHz if required.
I obviously need the USB stick as memory, for write speed and memory size (EEPROM would be far to slow and would need far to many EEPROM chips to reach the amount of data i need to store). Plus there is a great appeal to being able to pull the stick out and read in on the PC.
I really hope people may be able to give me some advice on this one, as I really don't want to have to move away from PICAXE for speed issues.
Many Thanks!
Matt
I've been using PICAXE for a relatively long time now, and am really finding alot of enjoyment and inspiration in it. I've made a fair few successful projects, and am now planning on the following! This is my first post to the PICAXE forum so bear with me if I seem a little green to you guys!
Basically I want to create a datalogger, using the normal readadc10 command and related potential divider circuit etc, the usual sort of set up.
I then want to output the ADC results to a USB pen drive through the vDrive2 module, using a variation of profmason's sample code. This will use the normal hserout commands etc.
All this seems ok, the catch comes here. I want to be running the PICAXE at 8MHz, and want to read the ADC (10 bit) pin over a period of 1 second. I will be using the minimal amount of code during the ADC scanning loop, ie read the ADC and then write to the USB drive, then repeat. But I also need the data to be read and then written to the USB drive at a rate as close as possible to 8MHz. Obviously time will be lost when reading the ADC pin and then output to the USB, but I was hoping that it would be minimal, as I couldn't find any official times that these instructions take. I can make the PICAXE run at 16MHz if required.
I obviously need the USB stick as memory, for write speed and memory size (EEPROM would be far to slow and would need far to many EEPROM chips to reach the amount of data i need to store). Plus there is a great appeal to being able to pull the stick out and read in on the PC.
I really hope people may be able to give me some advice on this one, as I really don't want to have to move away from PICAXE for speed issues.
Many Thanks!
Matt