cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

bhra_284931
New Contributor

Hi,

   

Currently am working with the IC CY8C20666A using PSoc Desinger5.4.

   

I what to know the statement for  open a file ​ in the system (from any drive) in the coding.

   

 

   

Thanking you..

0 Likes
Reply
11 Replies
ETRO_SSN583
Esteemed Contributor

See attached.

0 Likes
Reply
bhra_284931
New Contributor

Dana,

   

Is any C File functions is available in this IDE ? like fopen() and fclose(),Otherwise give any alternative function

   

i want to open a file from the system drives...

   

Thank you.

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

No, not in the Designer Environment per se. You have to write C code to create that

   

capability and address the device drivers needed to communicate to the file server. Or

   

use the SDCARD library and modify it to handle your specific file device.

   

 

   

Regards, Dana.

0 Likes
Reply
bhra_284931
New Contributor

Dana,

   

Device Drivers means,For this am using USB Interfacing with CY8C20666A to the System,Can you send me the sample code or any document  Please..

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

I am not aware of any drivers to do this, other than the SDCARD code to implement a

   

FAT file system, and that will not run on the part you are using do to its RAM / ROM limitations.

   

 

   

Maybe someone else knows of something.

   

 

   

Regards, Dana.

0 Likes
Reply
JoMe_264151
Expert II

Bhupati,

   

so not to misunderstand you:

   

You want to open a file in the "System". What do you understand under "System"?

   

You have got a PSoC1 and... ? A PC?

   

Then the PSoC1 will be connected to the PC-Host and there is no way for the PSoC to "open a file". Only the host can do that and then send the data to the PSoC via USB interface . USBUART could be an easy-to-use component, but I'm not quite aware whether available on your chip.

   

Edit: No, there is no USBUART on your target chip, only a USBFS (FS = Full Speed), so you'll have to implement the protocol yourself.

   

 

   

Bob

0 Likes
Reply
bhra_284931
New Contributor

Bob,

   

Thank you for reply, System means PC sir.

   

 Am using USBFS only for this interfacing CY8C20666A to PC-Host.

   

Now am trying to write a code for my own protocol like sending some of the commands to open a files in the PC  by using the part CY8C20666A with USBFS,

   

​have you any idea give me a good suggestion sir.

   

 

   

Thanking you,

   

Bhupati.

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

Or send the file via whatever method (UART, I2C USB bridge, SPI) to PSOC and its SDCARD interface, then open

   

the file under the SDCARD FAT APIs.

   

 

   

Regards, Dana.

0 Likes
Reply
JoMe_264151
Expert II

So you will have to program an interface on your PC for sending the file contents to the PSoC.

   

What are the data you send and what are you going to do with them on the PSoC side? When you tell us a bit more about the project we will be better able to advise you.

   

 

   

Bob

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

Python for PC side or VB probably fastest way to do this.

   

 

   

Regards, Dana.

0 Likes
Reply
bhra_284931
New Contributor

Yes frontend software must, Java or VB both are possible ,But i am trying to my own application without frontend software .

0 Likes
Reply