CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

how to insert circuit diagrams in the forum

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gopalakrishnan



Joined: 18 Jun 2010
Posts: 25

View user's profile Send private message

how to insert circuit diagrams in the forum
PostPosted: Sat Oct 23, 2010 5:15 am     Reply with quote

I want to know how to insert circuit diagrams in this forum.

kindly help me


with regards
k.gopalakrishnan
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat Oct 23, 2010 9:02 am     Reply with quote

You need to save the image out on the web someplace accessable via http.

From there, you'd add the link here like this:

http://www.benjammin.net/~bkamen/images/I2C-Test.png

And then wrap is with the IMG /IMG tags... and viola


_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Oct 23, 2010 2:52 pm     Reply with quote

I suggest ImageShack for free image hosting:
http://imageshack.us/
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat Oct 23, 2010 3:03 pm     Reply with quote

Just make sure you are ok/accepting of their Terms of Service.

part of it reads:

By displaying or publishing ("posting") any Content on or through the ImageShack Services, you hereby grant to ImageShack and other users a non-exclusive, fully paid and royalty-free, worldwide, limited license to use, modify, delete from, add to, publicly perform, publicly display, reproduce and translate such Content, including without limitation distributing part or all of the Site in any media formats through any media channels, except Content marked "private" will not be distributed outside the ImageShack Services. ImageShack and/or other Users may copy, print or display publicly available Content outside of the ImageShack Services, including without limitation, via the Site or third party websites or applications (for example, services allowing Users to order prints of Content or t-shirts and similar items containing Content). After you remove your Content from the ImageShack Website we will cease distribution as soon as practicable, and at such time when distribution ceases, the license to such Content will terminate. If after we have distributed your Content outside the ImageShack Website you change the Content's privacy setting to "private," we will cease any further distribution of such "private" Content outside the ImageShack Website as soon as practicable.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Oct 23, 2010 3:40 pm     Reply with quote

I'm assuming anyone on here will only use it to post transitory debugging
issues for hobbiest stuff.
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sat Oct 23, 2010 3:51 pm     Reply with quote

PCM programmer wrote:
I'm assuming anyone on here will only use it to post transitory debugging
issues for hobbiest stuff.


Right -- but I make sure to point it out because I have way to many friends/relatives with college degrees who don't bother to read the fine prints of the ToS.

I'd like to say that I'm continually shocked at how many don't realize posted pics can become the property of Facebook (or any other media bucket)...

But I'm not shocked. The numbers are just staggering at this point.

how's that go? Safety|Legalese first? hahaha.

Cheers,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Sun Oct 24, 2010 9:45 am     Reply with quote

bkamen wrote:
I'd like to say that I'm continually shocked at how many don't realize posted pics can become the property of Facebook (or any other media bucket)...


In the same vein...

Some time ago I found myself in the media spotlight because of a recommendation I made to my local government to test a new technology. The media were all over it and even though I didn't realize it at the time, they began sifting through all the major online sources [for teenagers Rolling Eyes ].

A few days later I was examining my site's web logs and there were several links from searches that originated from facebook, twitter, myspace, etc. I couldn't figure out where they came from until a few days after that.

Some local girl had been killed and the newspaper had a photo of her up immediately, courtesy of facebook. Ding ding ding. Then the web logs made sense.

The reporters were digging for any personal information about me that they could, and that's why I had all the strange links in my logs.

And since then I've noticed that whenever something bad happens - someone is killed, charged with a crime, whatever - the newspapers always have a facebook photo of the deceased/accused. They'll often also put up questionable quotes/activities from facebook which help to cast the person in question in a negative light. Even the TV news outlets are doing the same thing now.

You couldn't pay me enough to sign up for any of those stupid sites and I'm glad that I never did.... Remember that the internet is forever; keep your net identity clean or it will come back to haunt you.
gopalakrishnan



Joined: 18 Jun 2010
Posts: 25

View user's profile Send private message

regarding interfacing sd card
PostPosted: Mon Nov 08, 2010 3:29 am     Reply with quote

http://img442.imageshack.us/img442/8744/mmcconnection.jpg

This is the circuit diagram I followed, and my code is
Code:

#if defined(__PCM__)
#if defined(__PCH__)
#endif
#endif

#include <stdio.h>
#include <string.h>
#include <mmcsd.c>
#include <input.c>
#fuses XT,NOWDT,NOPROTECT,NOLVP

#use delay(clock=4000000)
#use standard_io(B)
#use standard_io(C)
#use standard_io(D)


#define LCD_ENABLE_PIN PIN_B0
#define LCD_RS_PIN PIN_B2
#define LCD_RW_PIN PIN_B1
#define LCD_TYPE 2

#define SPI_SDI PIN_C4  //PIN 23
#define SPI_SDO PIN_C5  //PIN 24
#define SPI_SCK PIN_C3  //PIN 18
#define SPI_SS  PIN_C2   //PIN 07

#define SPI_MODE_0  (SPI_L_TO_H | SPI_XMIT_L_TO_H)
#define SPI_MODE_1  (SPI_L_TO_H)
#define SPI_MODE_2  (SPI_H_TO_L)
#define SPI_MODE_3  (SPI_H_TO_L | SPI_XMIT_L_TO_H)


void lcd_init();
void lcd_cmd(cmd);               
void lcd_data(data);
void nibbel_split(unsigned long DataIn);

 int mmc_init();
 int mmc_response(unsigned char response);
 int mmc_get_status();
 int mmc_write_block(unsigned long block_number);
 int mmc_read_block(unsigned long block_number);



 unsigned char cmd,data;
 int i,j=0;
 int res,rcvdat;
 char send_data[]={"TRANSINNOVA INSTRUMENTS PVT LTD"};
 int read[32];
 int DDLN,DDUN,LN,UN;
 int errvalue;
 
void main()
{

  set_tris_b(0x00);
  set_tris_d(0x00);
  set_tris_c(0x10);
 
  lcd_init();
  lcd_data((mmc_init()+0x30));
  output_low(PIN_C2);
}

int mmc_init()
{

    setup_spi(SPI_MASTER|SPI_MODE_0|SPI_CLK_DIV_16);

    output_high(PIN_C2); // set high slave select signal before sending cmd0
    output_high(PIN_C5);
   
    for(i=0;i<10;i++)                       // initialise the MMC card into SPI mode by sending clks on
{
    SPI_WRITE(0xFF);
}

         output_low(PIN_C2);

         spi_write(0x40);
         spi_write(0x00);
         spi_write(0x00);
         spi_write(0x00);
         spi_write(0x00);
         spi_write(0x95);

if( mmc_response(0x01)==1)
 return 1 ;
                                     
i = 0;
while((i < 255) && (mmc_response(0x00)==1))    // if = 1 then there was a timeout waiting for 0x01 from the mmc

                                         // must keep sending command if response
{
        SPI_WRITE(0x41);                // send sd command 41 to bring out of idle state
        SPI_WRITE(0x00);                // all the arguments are 0x00 for command one
        SPI_WRITE(0x00);
        SPI_WRITE(0x00);
        SPI_WRITE(0x00);
        SPI_WRITE(0xFF);                // checksum is no longer required but we always send 0xFF
        i++;
}
if(i >= 254)
 return 1;                               // if >= 254 then there was a timeout waiting for 0x00 from the mmc
 

OUTPUT_HIGH(PIN_C2);                    // set SS = 1 (off)

SPI_WRITE(0xFF);                       // extra clocks to allow mmc to finish off what it is doing

OUTPUT_LOW(PIN_C2);                   // set SS = 0 (on)

        SPI_WRITE(0X7A);
        SPI_WRITE(0X00);
        SPI_WRITE(0X00);
        SPI_WRITE(0X00);
        SPI_WRITE(0X00);
        SPI_WRITE(0XFF);   

       
       OUTPUT_HIGH(PIN_C2);                    // set SS = 1 (off)
       SPI_WRITE(0xFF);                        // extra clocks to allow mmc to finish off what it is doing
       OUTPUT_LOW(PIN_C2);                     // set SS = 0 (on)
if((mmc_response(0x00))==1)
return 1;
OUTPUT_HIGH(PIN_C2);            // set SS = 1 (off)

return 0;
}
int mmc_response(unsigned char response)
{
        unsigned long count = 0xFFFF;
               
        while(SPI_READ(0xFF) != response && --count > 0);
        if(count==0) return 1;   // loop was exited due to timeout
        else return 0;         // loop was exited before timeout
}
void lcd_init()
   {
      cmd=0x38;
      lcd_cmd(cmd);
      delay_ms(250);
      cmd=0x0E;
      lcd_cmd(cmd);
      delay_ms(250);   
      cmd=0x01;
      lcd_cmd(cmd);
      delay_ms(250);     
      cmd=0x06;
      lcd_cmd(cmd);
      delay_ms(250);
      return;
   }
   void lcd_cmd(cmd)
   {
      output_d(cmd);
      output_low(PIN_b2);//rs     
      output_low(PIN_b1);//read write
      output_high(PIN_b0);
      delay_ms(250);
      output_low(PIN_b0);//enabel
      return;
   }
   void lcd_data(data)
   {
      output_d(data);
      output_high(PIN_b2);//rs     
      output_low(PIN_b1);//read write
      output_high(PIN_b0);
      delay_ms(250);
      output_low(PIN_b0);//enabel
      delay_ms(250);
      return;
     
   }

I am expecting 0x00 in my lcd display. It shows blank. Kindly help me out of this problem.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Nov 08, 2010 11:48 pm     Reply with quote

You are inventing your own MMC/SD driver, and LCD driver, and
hardware. That's 3 possible areas for problems. I suggest that you
start by using code that already works. First get the LCD working.
Use an lcd driver from the CCS drivers directory or the Code library
section on this forum. Then use the CCS mmcsd.c driver and example
program which calls functions in the driver.
Quote:

c:\program files\picc\examples\ex_mmcsd.c
c:\program files\picc\drivers\mmcsd.c

Once you have the project working with that code, then you can try
creating your own code for it.

Look at this section on asmallri's website:
Quote:
How to implement an SD/MMC Card with a PIC Microcontroller

It's near the bottom of this page. Read the 2 links in that section.
http://www.brushelectronics.com/index.php?page=software
gopalakrishnan



Joined: 18 Jun 2010
Posts: 25

View user's profile Send private message

regarding sd card interfacing
PostPosted: Tue Nov 09, 2010 10:48 pm     Reply with quote

Sir I go through both of the sd card example files. I can't understand the coding what they are doing. Secondly how to implement this? Either I have to include the same program by cut copy and paste or is there any other library to include this? Kindly help me.


with regards
K.gopalakrishnan
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group