Need help with microSD click board and PC communication

General discussion on mikroElektronika development boards.
Post Reply
Author
Message
ChuckR
Posts: 34
Joined: 26 Feb 2014 21:30

Need help with microSD click board and PC communication

#1 Post by ChuckR » 16 Apr 2014 22:32

I am using EasyPIC V7 with the 18F45K22 chip, I installed the microSD click board in microbus socket 1. I put my sd card in a PC and formatted it. I loaded and flashed the microSD click common.mbas program. I connected a usb port on my Notebook to the USB UART connector. I moved J3 and J4 to the USB UART position. My notebook detected and wanted to install drivers for the new device. I worked through that with info I found in another post. So now I have a driver for the RS232 to USB port.
How do I get the information to show up on my PC? I was guessing through the terminal app but if so what settings should I use, i set the rate to 19200? I am unable to receive anything on the computer. When I power on the EasyPIC board I see the TX and RX lights flash 2 or 3 times.

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: Need help with microSD click board and PC communication

#2 Post by petar.timotijevic » 02 May 2014 19:28

Hello,

Please try product source code examples:

Example: microSD click Common - Set UART to 19200

Description: MMC library test. Upon flashing, insert a microSD card into the module, when you should receive the "Init-OK" message. Then, you can experiment with MMC read and write functions, and observe the results through the USART Terminal.

NOTES:
- Make sure that microSD card is properly formatted (to FAT16 or just FAT) before testing it with this example.
- Place microSD click board at the mikroBUS socket 1 on the EasyPIC7 board.
- Put power supply jumper (J5) on the EasyPIC7 board in 3.3V position.
- Put PORTA switches in the middle (neutral) position.
- Turn on Rx and Tx switches (SW1.1 and SW2.1) and place appropriate jumpers in the RS-232 position or USB UART position
- Connect RS-232 or USB cable to the respective UART connectors.



Example: microSD click FAT16 (Demonstration of usage of Mmc_Fat16 library)

Description: This project consists of several blocks that demonstrate various aspects of usage of the Mmc_Fat16 library.
These are:
- Creation of new file and writing down to it;
- Opening existing file and re-writing it (writing from start-of-file);
- Opening existing file and appending data to it (writing from end-of-file);
- Opening a file and reading data from it (sending it to USART terminal);
- Creating and modifying several files at once;
- Reading file contents;
- Deleting file(s);
- Creating the swap file (see Help for details);

NOTES:
- Make sure that microSD card is properly formatted (to FAT16 or just FAT) before testing it with this example.
- Place microSD click board at the mikroBUS socket 1 on the EasyPIC7 board.
- Put power supply jumper (J5) on the EasyPIC7 board in 3.3V position.
- Put PORTA switches in the middle (neutral) position.
- Turn on Rx and Tx switches (SW1.1 and SW2.1) and place appropriate jumpers in the RS-232 position or USB UART position.
- Connect RS-232 or USB cable to the respective UART connectors.


Product web page:

microSD click
http://www.mikroe.com/click/microsd/


Best regards,
Peter

ChuckR
Posts: 34
Joined: 26 Feb 2014 21:30

Re: Need help with microSD click board and PC communication

#3 Post by ChuckR » 27 Mar 2015 20:28

I've been out with some health issues so I'm just getting back to this. I was trying to use the sample program, and I made all of the board settings. In Hyperterminal I set up a connection at 19200 baud 8 data bits 1 stop bit and no parity. I tried all 3 settings for flow control. In my device manager under PORTS it says USB serial port(COM 4) . I have set this to 19200 baud, 8 data bits, no parity and 1 stop bit, flow control to none.
Initially it should say "Insert microSD Card" but I cant get this to display on my computer in the Hyperterminal software. Is their something else I have to set to make my computer receive the message?

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: Need help with microSD click board and PC communication

#4 Post by petar.timotijevic » 28 Mar 2015 13:38

Hi ChuckR,

Please can you tell me did you follow setup instructions?

Please can you attach photo of your development board with current settings which you tried for this example.


Best regards,
Peter

ChuckR
Posts: 34
Joined: 26 Feb 2014 21:30

Re: Need help with microSD click board and PC communication

#5 Post by ChuckR » 28 Mar 2015 14:42

Thank you for your reply, I worked on this for 8 hours yesterday and finally resolved it late last night. I'll elaborate so maybe this can help someone else. I found another post where someone sent in a picture of their board and were told to move the jumpers on J18. This got me looking into why, that is when I realized the jumpers on J12 need to be in the proper position as well to allow communication with the microbus board. Moving those jumpers allowed the board to write to the micro SD card but I still had communication problems with the computer. I believe the problem stems from the fact that the virtual port does not exist on the computer until you turn on the board, the processer on the board has already been running before the connection is made to hyper terminal.
Also the settings which worked for me were 19200, 8, N, 1 , None. Sometimes it wouldn't work but if I disconnected and reconnected the hyper terminal connection eventually it would dump a bunch of text that it was apparently holding in the buffer. To correct this I modified the code to wait a little longer after initializing the UART1 and I put in a loop with a long delay so it would send "Insert micro SD card" a few times about a second apart. This gave me time to reconnect the hyper terminal. I might miss the text the first few times but after the connection is made it works as it should. I was tired so I didn't play to see if extending the delay after the Uart1_INIT command mattered or not.
While I realize I need to get more familiar with my board it would have been nice for us beginners if the jumper settings for J12 and J18 had been included in the setup. These jumpers are inside the outlined area on the board for USB and since they were not mentioned in the setup instructions I ignored them. After studying the schematic it is obvious that they must be set to make the communications connections to the micro SD card.
Again, I appreciate your reply. Thank you.

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: Need help with microSD click board and PC communication

#6 Post by petar.timotijevic » 31 Mar 2015 11:17

Hi ChuckR,

I'm glad to see that you solve a problem.


Best regards,
Peter

Post Reply

Return to “Development Boards”