Show Posts
Pages: 1 2 [3] 4 5 ... 138
31  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: June 30, 2014, 05:01:33 am
Nice project! Congratulation!

I took the source from the first post and compiled for the 1284p mighty. I changed the RAM_SIZE to 10000 in cpu.c.
It compiles and I get
Code:
6502 EhBASIC [C]old/[W]arm ?

Memory size ?
in my terminal.
Sorry for my naive question - what needs to be done next? When I enter a number (or I just press enter) I see nothing.. smiley

PS: I've changed to TeraTerm terminal and it seems it works:
Code:
6502 EhBASIC [C]old/[W]arm ?

Memory size ?

9231 Bytes free

Enhanced BASIC 2.22

Ready
32  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 29, 2014, 04:43:33 am
Quote
Starting read test.  Please wait up to a minute
Read 4261.15 KB/sec
That is  only 19% overhead @42MHz SPI clock. Nice!
33  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 29, 2014, 03:17:18 am
Quote
With these subsidized Evaluation Boards from Chip vendors, it's a lot harder to get that 'feel' for end product cost
The nucleo boards must not be "subsidized".. All the boards are the same, as the chips have the same pinout. So they produce 9 variants of nucleo boards on the same pcb. The price of the 2 chips used is "not known" as it comes from STM (that could be called "subsidizing"). With 50k-100k boards from each variant they may do a profit, indeed..
PS: there was a discussion whether the Discovery boards are subsidized, an insider indicated they are not..
PS1: the chip vendors follow a "what the market will bear" strategy when pricing the chips. Internally they cost them "at costs". That is a huge difference of course. Moreover, for such demo boards they may use chips coming from batches which are a little bit off certain parameters.
PS2: my rough estimate: the development costs of a stm32F401 mcu could be $300k, fab preparation $200k, and the production costs of a single smd packaged chip about 50cents (rather conservative estimate, it could be less). They sell it to distributors and large volume clients for $3 a piece in an average (10k quantities). So they break even when they sell 200k chips.. It seems to me to put 10.000 chips into a nucleo board "at cost" may not ruin their business case.. smiley
34  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 28, 2014, 04:49:58 pm
Long time back I did experiments with SDIO on the F407 (@168MHz)under chibios and 5MB/sec was easy to get with 32kB blocks. My experiments were suboptimal, so I guess you may get 4-5MB/sec@84MHz..
35  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 28, 2014, 02:40:47 pm
What is your SPI clock?
36  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 27, 2014, 03:06:00 pm
.. moreover, you can run the code out of the external sdram.. Performance like a desktop PC in '93.. (or better with filesystem on the SDIO sdcard) smiley
37  Development / Other Hardware Development / Re: Anyone tried ST Nucleo boards? on: June 27, 2014, 01:11:11 pm
I am a big fan of the Discovery boards, but it seems the NUCLEO offering is quite large too:

Quote
The external SRAM has a 16-bit data bus and runs at 80 MHz.
It is an SDRAM. The r/w access to it is about 6x slower than to the internal on-chip sram.

PS: the 3xx and 4xx chips include an FPU (32bit single precision, +-* 1cycle, MAC-like 3cycles and / sqrt 14cycles) and 1cycle SIMDs.
38  Using Arduino / Storage / Re: SDfat slow buffer flush on: June 21, 2014, 10:07:33 am
Quote
I am looking to get a stable logging frequency of around 100 Hz. Currently I am sending 40 data samples to the buffer before flushing to the SD card and without the delay of 5 milli seconds I am able to log up to around 800 Hz.
The problem I am having is the time taken to flush values to the SD. It takes approx. 14 ms to flush the values meaning I miss capturing data during that period. When sending and flushing 1 value per loop the maximum frequency I can get is only around 60Hz.

What is the data rate you want to log??

I would estimate the 4 analog and the 6 IMU might be:  

Code:
(4 + 6) * 2 bytes = 20bytes
plus a timestamp ie. 4 bytes
total = 24bytes.

100x per second to log means 2.4kBytes/second data rate (my assumption here is the IMU is able to provide the data 100x per second).

An sdcard has the write latencies of dozens of milliseconds up to 250ms each XYZ milliseconds (almost random).

So in order to save 2.4kBytes/second to the sdcard, you need a FIFO buffer. The size of the FIFO buffer, worst case is:

Code:
FIFO_size = data_rate * worst_case_latency = 2.4kB/sec * 250msec = 600Bytes.

With a 600 Bytes large FIFO and the NilRtos you may (most probably) save your data on any sdcard.

PS: this topic has been discussed here many times. Search this forum for "Nilrtos Fifo"..




39  Products / Arduino Due / Re: "PORTC =" command cannot compile in Arduino Due mode?? on: May 23, 2014, 11:33:13 am
Quote
I am trying to interface a TFT display in the Arduino Due
You may use the EMB SMC bus - with Parallel library - it could be used for displays as well. There is an example for connecting an LCD too..
https://github.com/delsauce/ArduinoDueParallel
40  Using Arduino / Microcontrollers / Re: Barebones 328 ( 8MHz) access PB6 PB7 on: May 23, 2014, 11:25:12 am
You must change the fuse setting as well.
41  Products / Arduino Due / Re: Parallel library for Due External Memory Bus/Static Memory Controller on: May 22, 2014, 07:47:12 am
I did a measurement of the actual NWE signal High/Low durations during the 1mil write "for loop" vs. the NWE timing parameters settings (the resolution of my LA is 5ns):
Code:
A, P, C L H L+H MBytes/sec
========================================================================
1, 2, 4 25 205 230 4.35
1, 4, 6 45 180 225 4.44
1, 8,10 95 135 230 4.35
1,16,18 185 40 225 4.44
1,32,34 380 25 405 2.47

where
A - NWE setAddressSetupTiming
P - NWE setPulseTiming
C - NWE setCycleTiming
L[ns] - NWE active low pulse (write pulse)
H[ns] - overhead of the for..loop

How to decipher that results?? Any hint?
Why the L+H is constant for P=2 or 4 or 8 or 16?
42  Development / Other Hardware Development / Re: 8MB Ramdisk (external RAM) for Arduino.. on: May 22, 2014, 07:32:40 am
I've added a delay(500) before the "for loop" measurements (to eliminate the potential influence of print) and the result of above example sketch is:
Code:
START OF THE TEST
WRITING BYTES TO RAMDISK
READING BYTES FROM RAMDISK
SUM = 234000000
ELAPSED WRITE = 226 msec
ELAPSED READ = 262 msec
TEST STOP

That means one write cycle (inclusive "for loop") takes 226ns (or 4.4MBytes/sec).

Moreover, I did a measurement of the actual NWE signal High/Low durations during the 1mil "for loop" vs. the NWE timing parameters settings (the resolution of my LA is 5ns):
Code:
A, P, C L H L+H MBytes/sec
=====================================================================
1, 2, 4 25 205 230 4.35
1, 4, 6 45 180 225 4.44
1, 8,10 95 135 230 4.35
1,16,18 185 40 225 4.44
1,32,34 380 25 405 2.47

where
A - NWE setAddressSetupTiming
P - NWE setPulseTiming
C - NWE setCycleTiming

L[ns] - NWE Low - active low pulse (write pulse)
H[ns] - NWE High - the overhead of the for..loop
How to decipher that results?? Any hint?
 smiley-confuse

PS: the "NWE Low" copies the setPulseTiming well (NWE Low = 12ns * P), but why the L+H is constant or "framed" or "limited"??
43  Products / Arduino Due / Re: Parallel library for Due External Memory Bus/Static Memory Controller on: May 21, 2014, 04:39:32 am
Another issue I cope is the NWE timing does not react to NWE pulse setting properly.
Quote
Parallel.setPulseTiming(7,1,7,1);
For example doubling the setting (with adjusting the CycleTiming accordingly) does not change the total elapsed time for write. It seems the NRD setting works.
44  Development / Other Hardware Development / Re: 8MB Ramdisk (external RAM) for Arduino.. on: May 21, 2014, 04:15:09 am
Great!
I've been messing a little bit with the Parallel driver, as it seemed to me the driver is slow.
I did following:
Comment out in Parallel.cpp:
Code:
//__attribute__((optimize("O0"))) void ParallelClass::write(uint32_t offset, uint8_t data)
//{
// *((volatile uint8_t *)(_addr + (offset&0x00FFFFFF))) = data;
//}
 
//__attribute__((optimize("O0"))) uint8_t ParallelClass::read(uint32_t offset)
// {
// return *((volatile uint8_t *)(_addr + (offset&0x00FFFFFF)));
// }

And replace in Parallel.h :
Code:
void write(uint32_t offset, uint8_t data) ;
uint8_t read(uint32_t offset);  
with:
Code:
void write(uint32_t offset, uint8_t data)
{
*((volatile uint8_t *)(_addr+offset)) = data;
}

uint8_t read(uint32_t offset)
{
return *((volatile uint8_t *)(_addr+offset));
}

Then I get following elapsed time for the above example sketch:
Code:
START OF THE TEST
WRITING BYTES TO RAMDISK
READING BYTES FROM RAMDISK
SUM = 234000000
ELAPSED WRITE = 321 msec
ELAPSED READ = 262 msec
TEST STOP

There is still an issue as the NWE timing does not react to timing parameter changes properly. The NRD timing works fine, it seems.

45  Community / Products and Services / Re: The Zero is upon us! on: May 19, 2014, 01:59:21 pm
That is a concept ie. all STM Discovery boards or LPCxpresso boards use.
A debugger chip and the MCU of interest. The debugger chip is closed, so you cannot clone it, usually includes an encryption key for the IDE debugger (so it works for specific chip types or license only).
What you may do is to purchase a single board, and use the board (or better the debugger part of the board) as a debugger/programmer for your other barebone designs (via SWD or JTAG).
Pages: 1 2 [3] 4 5 ... 138