View previous topic :: View next topic |
Author |
Message |
jacqueskleynhans
Joined: 10 Apr 2008 Posts: 109 Location: Cape Town, South Africa
|
Another serial question |
Posted: Fri Oct 22, 2010 1:13 pm |
|
|
What is the fastest practical speed a pic can write serial data to a pc.
I know it depends on the baud but it doesn't matter how fast the baud is if the actual printf function is slower.
I know this might be a noob question pls bear with me.
I have sram connected to a fpga which send data on a rising clk pulse from the pic that increments a address register so after a--
high
low
The data is available on the psp of the pic.
Now if I use the printf to send the data to pc.... I was wondering how fast will it be 8Mb sram. so 8 mil bytes. I don't want to clk for hours.
Any suggestion for a quick and efficient way of sending that data to the pc ?? _________________ "THE ONLY EASY DAY WAS YESTERDAY" |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9216 Location: Greensville,Ontario
|
|
Posted: Fri Oct 22, 2010 1:55 pm |
|
|
Depends on
1) how fast the 'pc' can recevive the data...
most pcs can handle 921600 baud without problems..
2) what pc program is handling the data ?
again, that depends on who wrote it,what it does with the data,etc.....
3) distance from PIC to PC as well as hardware (RS232,RS485,ILOOP,???)
there is a tradeoff of speed vs. distance although newer chips are a lot better than those of the 'good old dayze'
4) If you can 'dump' all 8 megabytes in one loop, maybe using putc(x) is the fastest or even an assembler macro of load char,send,chk if rdy, inc data pointer, loop.....
You can easily cut PIC code to test, just send 8 million 'x's out your serial port and time the event.Compare using the printf command vs. putc command.Actually sending 10,000 will tell you just as well...
just some ideas... |
|
|
jacqueskleynhans
Joined: 10 Apr 2008 Posts: 109 Location: Cape Town, South Africa
|
|
Posted: Fri Oct 22, 2010 2:19 pm |
|
|
Hi Tem..
I am usually using putty for serial stuff, instead of windows HT.
Distance well.... the uart implementation will be step one to test that my system actually works then I will switch over to an SDcard.
Thx _________________ "THE ONLY EASY DAY WAS YESTERDAY" |
|
|
jacqueskleynhans
Joined: 10 Apr 2008 Posts: 109 Location: Cape Town, South Africa
|
|
Posted: Fri Oct 22, 2010 4:10 pm |
|
|
What I basically need is an fast and efficient way of getting the sram data from the psp port into a log file on the computer which I will then manipulate further in Matlab.
J _________________ "THE ONLY EASY DAY WAS YESTERDAY" |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9216 Location: Greensville,Ontario
|
|
Posted: Sat Oct 23, 2010 5:43 am |
|
|
Well I'm confused..first you wnat to use serial from PIC to PC for data transfer, then you say, I think that there's SRAM-->FPGA-->PIC--PC setup.Then ther's that SD hardware?
If the SRAM data goes throught the FPGA and is ransferred to the PIC a byte at a time then....
You could eliminate the PIC and have the PC do the transfer via the LPT ( parallel printer) port. This is 'old school', allows for FAST transfer of data and loses the PIC which means this question should be dropped from the discussion...
However you could use the PIC to recevive the data on it's PSP (which you say is how it is) and then retransmit it via a second port to the PC parallel port...which is very simple to do AND is a valid question on this board.Code for that is maybe 30 C lines long...
A better description of the hardware would help.... |
|
|
jacqueskleynhans
Joined: 10 Apr 2008 Posts: 109 Location: Cape Town, South Africa
|
|
Posted: Sat Oct 23, 2010 9:07 am |
|
|
Hi tem, sorry bro
The thing is I am building a camera system for a satellite that is one of the payloads of the satellite. The main on-board computer talks i2c to all the subsystems of the satellite that why I am using the pic. My camera sensor is connected to an FPGA which also connects to a sram as image buffer before is is to be stored in solid flash ie Sd card.
The pic is sending the fpga a read clk that increments a address counter on every rising to make data available on the psp. Then I have to send it to the PC as mentioned for initial testing. But I can also bypass the pc and just send it to the SD card, but I'm not so clued up in sd card workings. I managed to purchase a driver from Andrew @ brushelec. So now I'm waiting for it so that I can start testing.
Thx _________________ "THE ONLY EASY DAY WAS YESTERDAY" |
|
|
|