Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2024, 08:24:53 08:24


Login with username, password and session length


Pages: 1 2 [All]
Print
Author Topic: Can we make SD Card reader using PIC18F2550??  (Read 15531 times)
0 Members and 1 Guest are viewing this topic.
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« on: April 10, 2013, 02:39:07 02:39 »

Hello!! Everyone.

In proteus samples section, i had seen one mass storage device example using PIC18F4550.

But now the Microchip Application Libraries doesn't support this project.

So can we make a Mass Storage Device SD card Reader using PIC18F4550 or PIC18F2550.

As i saw one project in Microchip Application Library USB Section, which shows MSD but for internal flash of PIC18F4550.

But i need to do it for SD Card.
Is it possible??
If yes then suggest me how can i do this.
Logged
Parmin
Hero Member
*****
Offline Offline

Posts: 582

Thank You
-Given: 494
-Receive: 133


Very Wise (and grouchy) Old Man


« Reply #1 on: April 10, 2013, 03:14:33 03:14 »

I believe PIC18 starter kit would include such example.

You should be able to download the codes and schematic from Microchip.
Logged

If I have said something that offends you, please let me know, so I can say it again later.
happylex
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 7
-Receive: 3


« Reply #2 on: April 10, 2013, 09:32:28 09:32 »

They give examples, and it is easy to adapt. Just download the library or framework:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en547784

I adapted  a project for PIC18F4550 to a PIC24FJ256GB106 within one hour. This was my first USB C code for PIC.
Logged
flo0319
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 7
-Receive: 17


« Reply #3 on: April 10, 2013, 05:57:09 17:57 »

 You need to download first Microchip Application Library from link give by happylex.
After you have installed it, you need to go in the [installed folder \ USB \ Device - Mass Storage - SD Card reader] there is a project for 18F46J50, you can adapt it for 18F2550 easy
Logged
motox
Cracking Team
Active Member
****
Offline Offline

Posts: 187

Thank You
-Given: 255
-Receive: 319



« Reply #4 on: April 10, 2013, 07:29:32 19:29 »

- Use this project: “C:\Microchip Solutions v2013-02-15\PIC18F Starter Kit 1\Demos\USB Device - Mass Storage - SD Card reader\MSD - SD Card Reader - Firmware”.
- Change the file ‘HardwareProfile - PIC18F Starter Kit.h’ according to your board. Include in this file the following definition: ‘#define PICDEM_FS_USB”. This will set the correct configuration bits in code.
- Create the linker file according to application note AN1003.
- Check the function ‘static void InitializeSystem(void)’ for any necessary code change.

If I don’t miss anything this should be enough.

Remember that if you don’t use the LF version then you need to add some voltage translators in your circuit.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #5 on: April 11, 2013, 05:45:48 17:45 »

Thanks for your replies.

I modified the PIC18F47J53 SD Card Reader Project.

Right now i am changing it for PIC18F4550, after so many errors, i am getting one last error.
And it is associated with Linker.

Code:
MPLINK 4.40, Linker
Device Database Version 1.3
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - could not find definition of symbol 'GetInstructionClock' in file 'Objects\47J53_PIM\SD-SPI.o'.
Errors    : 1

I am also getting one warning while compiling
Call of function without prototype and it is associated with this function

Code:

void Delayms(BYTE milliseconds)
{
    BYTE    ms;
    DWORD   count;
    
    ms = milliseconds;
    while (ms--)
    {
        count = MILLISECDELAY;
        while (count--);
    }
    Nop();
    return;
}

I am not getting what is the problem, it is related with instruction cycle, but i am not getting how to solve this
Logged
motox
Cracking Team
Active Member
****
Offline Offline

Posts: 187

Thank You
-Given: 255
-Receive: 319



« Reply #6 on: April 11, 2013, 05:50:52 17:50 »

Put here a zip file with the project. I can correct the errors.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #7 on: April 12, 2013, 01:57:03 01:57 »

I am uploading my project in zip folder pls have a look at it.

And correct the errors i am getting in this.

The project file is located here
"\SD_Card Reader PIC18F2550\Microchip Solutions v2011-12-05\USB\Device - Mass Storage - SD Card reader\Firmware"

In this project, at some places it is written pic18f2550, but it is for pic18f4550 at the moment.
Please don't confuse with that.
Logged
motox
Cracking Team
Active Member
****
Offline Offline

Posts: 187

Thank You
-Given: 255
-Receive: 319



« Reply #8 on: April 12, 2013, 09:56:43 09:56 »

It’s done.
Just add the GetSystemClock() and GetInstructionClock() definitions in the file ‘HardwareProfile - PIC18F2550.h’<line 158>:
Code:
#define GetSystemClock() CLOCK_FREQ
#define GetInstructionClock() (GetSystemClock() / 4)
« Last Edit: April 12, 2013, 10:03:07 10:03 by motox » Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #9 on: April 12, 2013, 05:12:59 17:12 »

Hello!!
Thanks that works..

When i simulate the Project in Proteus, the MSD is detected by PC but no pen drive is detected.
What is the reason behind this

I am getting some driver issue.
Pls have a look at the image.


Posted on: April 12, 2013, 06:10:50 18:10 - Automerged

If possible, pls run the simulation on your pc and checks whether it is running or not.
Logged
motox
Cracking Team
Active Member
****
Offline Offline

Posts: 187

Thank You
-Given: 255
-Receive: 319



« Reply #10 on: April 12, 2013, 05:20:33 17:20 »

Run the attached program, select the USB device and post the resulting print screen.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #11 on: April 12, 2013, 05:36:08 17:36 »

I am running the proteus simulation and nothing happens this time also.
And nothing appear in the application you give to me.

Here are the snapshot.
Logged
motox
Cracking Team
Active Member
****
Offline Offline

Posts: 187

Thank You
-Given: 255
-Receive: 319



« Reply #12 on: April 12, 2013, 06:31:15 18:31 »

I never used Proteus and I don’t trust it.  Roll Eyes
Try to debug the problem. Start to check the value of the variable ‘USBDeviceState’. It’s like a state machine that tells you the USB connection status.
Logged
flo0319
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 7
-Receive: 17


« Reply #13 on: April 12, 2013, 08:02:19 20:02 »

In proteus is implemented a MMC card and not a SD card, it's a difference between commands(initialization and addressing data) for manage these type of cards. 
Logged
#tester
Newbie
*
Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 15


« Reply #14 on: April 12, 2013, 10:30:04 22:30 »

and where is the data file for your formatted SD Card, virtual or real.
without a formatted card you can't read/or/write..
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #15 on: April 13, 2013, 03:26:06 03:26 »

Quote
I never used Proteus and I don’t trust it.  Roll Eyes
Try to debug the problem. Start to check the value of the variable ‘USBDeviceState’. It’s like a state machine that tells you the USB connection status.

Ok i will check that, and will also run the code on real hardware, but after two days, as i am not having that board right now.

Quote
In proteus is implemented a MMC card and not a SD card, it's a difference between commands(initialization and addressing data) for manage these type of cards. 
Proteus has a mmc card not sd card, but the code will work for both card, as i had tested that earlier when experimenting with MDD Library and PIC18F8722 Project Example, it successfully create file in the card.

Quote
and where is the data file for your formatted SD Card, virtual or real.
without a formatted card you can't read/or/write..

There is a Software WinImage, by the help of which i create Memory Card image of 2MB for my MMC Card in Proteus.
It is not working with this project, but had worked in proteus earlier when i experiment with MDD Library project.

Posted on: April 13, 2013, 03:59:12 03:59 - Automerged

One strange thing.
 Sad

When i run the PIC18F47J53 SD Card Reader Project in Proteus it working fine, but the one with PIC18F2550
Even i changed nothing in this.
Logged
happylex
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 7
-Receive: 3


« Reply #16 on: April 21, 2013, 03:05:42 15:05 »

You can try to debug in the simulation. I have seen it is possible for AVR and even Arduino code when using the .elf file, and it looked like a debugger with all the possible options the hardware debuggers also have.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #17 on: April 21, 2013, 04:43:50 16:43 »

What should i debug, means what should i do, so that i can get to know where is the problem.

And i am making a real hardware and will try to implement it on that and will check the transaction in usblyzer software.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #18 on: April 22, 2013, 05:32:32 17:32 »

Finally i tested my code on real hardware.
What i found is Microchip Mass Storage Device detected successfully but nothing happens means i am not able to view the Removable Disk Drive as supposed to be.


Posted on: April 22, 2013, 06:31:16 18:31 - Automerged

No Disk Drive appears, :-(

What should i do now.

I am also attaching UVC View Software Snapshot when this device is connected.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #19 on: April 23, 2013, 03:22:00 03:22 »

Have a look at this, it is showing I drive means some thing is there, but nothing appears in windows explorer

Logged
avrlover
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 50
-Receive: 217


« Reply #20 on: April 23, 2013, 07:10:19 07:10 »

here is application note from microchip might help u
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #21 on: April 23, 2013, 07:18:10 07:18 »

I had read that application note.
But not able to solve my problem.

I dont know why this happen.
As device manager us showing microchip mass storage device but not showing the drive.
 Sad
Logged
avrlover
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 50
-Receive: 217


« Reply #22 on: April 23, 2013, 07:40:45 07:40 »

I have use code an1003 in Proteus it shows drive letter but drive is not accessible  try your this code in Proteus i am using windwos xp sp3
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #23 on: April 23, 2013, 10:47:11 10:47 »

When i remove the memory card.
It is showing the drive in windows explorer .
When memory card is inserted nothing appears in windows explorer.

I am not getting what is tge problem.
Can anyone check my linker file fir pic18f4550.


Posted on: April 23, 2013, 11:46:01 11:46 - Automerged

My code is not working in priteus as i had stated in my earlier post
Logged
avrlover
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 50
-Receive: 217


« Reply #24 on: April 23, 2013, 11:18:10 11:18 »

so u can use code supplied by microchip an1003
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #25 on: April 23, 2013, 11:56:50 11:56 »

I didnot used that i think.
Can you please upload your code.

What i think is that you are talking about microchip usb framework stack supplied by microchip.

And i am using that
Logged
Parmin
Hero Member
*****
Offline Offline

Posts: 582

Thank You
-Given: 494
-Receive: 133


Very Wise (and grouchy) Old Man


« Reply #26 on: April 24, 2013, 12:02:28 00:02 »

Use USBDVIEW to uninstall cache drivers for the device before reconnecting the USB.
Often your HID driver hang up on windows.
Logged

If I have said something that offends you, please let me know, so I can say it again later.
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #27 on: April 24, 2013, 02:42:42 02:42 »

I un-installed many drivers related to usb with the software you told.

Then when i connect my device it is searching for drivers.
 Sad
Operating system search for microchip mass storage device and then install driver.

After sometime the drive i appears in the windows explorer and after that it disappear.
What should i do know.

It appears for seconds and then disappears.
Sad
« Last Edit: April 24, 2013, 02:48:13 02:48 by xpress_embedo » Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #28 on: April 24, 2013, 07:09:33 07:09 »

I tried this in windows xp
It is showing the the drive but doesnt show anythibg else


I tries to observe the spi pins on oscilloscope and found that no pin is changing its status except the chip select pin.
Why my spi is not working.
I am using the code tempelate of microcjip usb framework is there any bug or i am doing it wrong
Logged
avrlover
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 50
-Receive: 217


« Reply #29 on: April 24, 2013, 07:27:45 07:27 »

source code for an1003
http://ww1.microchip.com/downloads/en/AppNotes/MCHPMSD.zip
Logged
flo0319
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 7
-Receive: 17


« Reply #30 on: April 24, 2013, 09:21:54 21:21 »

Hello!!
Thanks that works..

When i simulate the Project in Proteus, the MSD is detected by PC but no pen drive is detected.
What is the reason behind this

I am getting some driver issue.
Pls have a look at the image.


Posted on: April 12, 2013, 06:10:50 18:10 - Automerged

If possible, pls run the simulation on your pc and checks whether it is running or not.


in picture attached at your post I can observe that in simulation log appear MMC unsupported command. Mass storage device driver is a generic protocol for manage memory platforms, this is did over USB driver. So, your connection with mmc/sd card can not work correctly but in windows will appear your card drive (because this is just something virtual).

Also in  C:\Program Files\Labcenter Electronics\Proteus 7 Professional\SAMPLES\VSM for USB\PICDEM FS USB\MSD  is the PIC18F4550 project example for what you need using without any modify application note AN1003. you can view there is no any log error with mmc commands
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #31 on: April 25, 2013, 02:47:23 02:47 »


When i build this project i get an error.

C:\MCHPMSD\MSD\system\Compiler.h:241:Error [1034] previous definition of macro 'STKOVF' does not agree


I comment this line
#define STKOVF              STKPTRbits.STKFUL

In the compiler.h header file and it gets compiled

After that i check the Configuration Settings of the hex file, it is for 48Mhz Crystal.
Then in code i didn't find where are configuration settings written.

Then i write manual the configuration settings in the main.c file

/****Configuration bits****/
#pragma config PLLDIV   = 5       
#pragma config CPUDIV   = OSC1_PLL2 
#pragma config USBDIV   = 2       
#pragma config FOSC     = HSPLL_HS
#pragma config FCMEN    = OFF
#pragma config IESO     = OFF
#pragma config PWRT     = OFF
#pragma config BOR      = OFF
#pragma config VREGEN   = ON
#pragma config BORV     = 3
#pragma config WDT      = OFF
//#pragma config WDTPS    = 32768
#pragma config MCLRE    = ON
#pragma config LPT1OSC  = OFF
#pragma config PBADEN   = OFF
#pragma config STVREN   = ON
#pragma config LVP      = OFF
#pragma config XINST    = OFF       // Extended Instruction Set


Then Microchip Mass Storage Device Detected and Drive I: Appears in the Windows Explorer, but doesn't get open.


Posted on: April 25, 2013, 03:42:12 03:42 - Automerged

Also in  C:\Program Files\Labcenter Electronics\Proteus 7 Professional\SAMPLES\VSM for USB\PICDEM FS USB\MSD  is the PIC18F4550 project example for what you need using without any modify application note AN1003. you can view there is no any log error with mmc commands

This is always shown in proteus, but in my earlier projects related to mmc but it works without any error.

And i am testing this all on real hardware and they are not working.

The the Demo Given by Proteus is AN1003 Application Note.
The hex file in that folder of Proteus Sample works for my board :-)

But i use pic kit 3 to program my board, as soon as i remove the pik kit 3
Unrecognized USB Found, and i connected and system restarted it works. :-(
Logged
flo0319
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 7
-Receive: 17


« Reply #32 on: April 25, 2013, 06:57:35 18:57 »

Can you put here a picture with your project schematic and the simulation log window opened?
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #33 on: April 27, 2013, 03:57:44 03:57 »

The Schematic i am using is Similar to PICDEMFS Board.

There are two that i am trying to run one is the one i modified the SD Card reader of PIC1847J53 for PIC18F4550.
It stops in proteus at some instance.

And then the second one with the application note AN1003 is moving further but not producing the result on proteus and not on Real Hardware.
Logged
flo0319
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 7
-Receive: 17


« Reply #34 on: April 27, 2013, 02:41:22 14:41 »

I ask you for simulation log and not for usb log. there is important if the MMC card receive good commands
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #35 on: April 27, 2013, 05:35:58 17:35 »

I am attaching the Snapshot of the Simulation Log, of proteus
One with the code in Application Note AN1003, this is showing no Error except a warning indicating excessive CPU Load

and while the Modified SD Card Demo is Showing
Two Unsupported Commands, which i had seen many times before, i think here it is topping the execution of process.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #36 on: May 01, 2013, 02:38:51 02:38 »

Is there any solution for this..

The PIC18F4550 and even the project with PIC18F47j53 both are not working, they both are showing Microchip Mass Storage Device in the Windows Device Manager but not showing any drive in windows explorer.

And one of the best part with PIC18F4550 and Application Note Source code AN1003.
Lab-center Electronics Said that they didn't modified the source code of AN1003 and puts directly it in the sample design of pic18f4550 mass storage application.
But when i put that code, it didn't work.
Anyways this is all about proteus, lets discuss some real hardware stuff.

I put the hex file given in proteus into my PIC18F4550, in its configuration bits 48Mhz Oscillator is set.

I import the hex file in MPLAB and then Select PIC KIT 3 as my programmer and after that i change the configuration bits in MPLAB to meet my board requirement i.e 20Mhz Crystal.

And it works :-)
But as soon as i disconnect my pic kit 3 it stops working.
This is really strange.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #37 on: May 02, 2013, 04:06:35 16:06 »

Finally some good news.

I finally made hardware for PIC18F47J53 Micro-controller as per there SD Card Reader Demo, as per circuit diagram below.

When I didn't connect the VDDCORE/Vcap and Vusb pin with nothing, similar affect happens as i am facing with pic18f4550.

When as soon as connecting these pins with +3.3V everything is working fine, mass storage is detected and a drive is shown in windows explorer with all the files present in it.
But the speed is really very slow, it is working but very slowly, but it is okay with me.

Now can anyone tell me the significance of these pins VDDCORE/Vcap and Vusb

and in PIC18F4550 based hardware i had connected Vusb pin to ground with a capacitor of 220pF in between.
I am going to give it a +5V or +3.3V after reading sufficient details about this pins.

Please suggest me something..
Logged
Catcatcat
Senior Member
****
Offline Offline

Posts: 417

Thank You
-Given: 275
-Receive: 1534



WWW
« Reply #38 on: May 04, 2013, 03:59:26 15:59 »

Maybe this link will be useful
FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture. It can be incorporated into low cost microcontrollers, such as AVR, 8051, PIC, ARM, Z80, 68k and etc..., without any change.

Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #39 on: May 07, 2013, 06:35:46 18:35 »

I solved my problem,
Everything is working properly.

I just connect a 3.3V to VUSB pin in PIC18F4550 and my code starts working.
But still not able to know why msd class did work when i connected 3.3v to Vusb.

As i had not done all this with cdc and hid class
Logged
LithiumOverdosE
Senior Member
****
Offline Offline

Posts: 350

Thank You
-Given: 374
-Receive: 568


« Reply #40 on: July 14, 2013, 02:25:50 02:25 »

I'm a bit late but if somebody needs original Labcenter SD Card images and tool they used to manipulate them here they are.  Wink

Note to mods:

You might as well move this post to Proteus models and libraries section. I suspect it will be forgotten here and it could be useful to somebody.
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #41 on: July 14, 2013, 06:49:54 06:49 »

post it there then.
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #42 on: August 14, 2013, 04:08:47 04:08 »

I am making new SD Card Reader Project using PIC32MX795F512L, but it is having the same problem which i am getting with my previous PIC18F2550, even its VUSB3V3 line is connected to 3.3V.

I had connected the VBUS to the supply coming from USB Port of computer and i am using SPI2 Port for interfacing memory card with PIC32

Please have a look at my code and if someone knows what is the problem with this, i think its in my hardware but dont, know that exactly.
« Last Edit: August 14, 2013, 05:08:18 05:08 by xpress_embedo » Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #43 on: August 14, 2013, 09:37:40 09:37 »

I am using mikroc for PIC32 example for Mass Storage Class Example.

It is working fine with the same hardware, while the above code is not.
« Last Edit: August 14, 2013, 10:37:51 10:37 by xpress_embedo » Logged
gan_canny
Junior Member
**
Offline Offline

Posts: 89

Thank You
-Given: 101
-Receive: 26


« Reply #44 on: August 15, 2013, 02:47:35 14:47 »

Vusb
The PIC chips with usb have the equivalent of two processing components. Since usb is very very timing critical it has a separate clocking component within the PIC. The PIC instruction set also needs timing. Since for the usb timing ( absolute 32 Mhz)  is most critical this clock is essentially considered primary and the PIC lock is derived from it. Vusb can impact the usb timimg ( and therefore the PIC) and is usually connected through a capacitor to ground. I always use 0.47uf but it isn't critical but too small a value won't sufficiently absorb stray ground issues ( electrons on the loose) coming in from the usb connector ; too large a value and it won't react fast enough. Usb is a differential signal but it still needs a well behaved ground. Now a usb connector's pins are designed in such a way as to have the power connect before the D- D+ when manually being inserted into a USB socket.
Likewise on disconnect the power comes of last. Depending on the code you write for the pic  you may need to address this to discover if you ) a slave) are still plugged into the master.

///     Vusb ------| |----- GND
////               0.47uf
//                             100k
//        5V    VBUS-----+----/\/\/\/\/\----- (USB_CON_SENSE_PIN ON PIC PIN_B5)
//                     |
//                     +----/\/\/\/\/\-----GND
//                             100k
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« Reply #45 on: August 16, 2013, 07:40:25 07:40 »

Thanks for your help,

But the problem was in my software.

Correct the Hardware Profile.h as follow:-
Code:

    #define putcSPI             putcSPI2
    #define getcSPI             getcSPI2
    #define OpenSPI(config1, config2)   OpenSPI2(config1, config2)

I am using SPI1 instead of SPI2 now it is working.

gan_canny you are saying that i have to connect the VUSB3V3 to ground with a CAP, i found this too in the datasheet of PIC32.

But in USB Starter Kit 2 Manual they had connected this Pin to PIC32_VDD which means to 3.3V

and it is working with both, either connecting that pin to ground using cap or connecting that pin to Supply.
Both Works.
« Last Edit: August 16, 2013, 08:05:49 08:05 by xpress_embedo » Logged
Pages: 1 2 [All]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC