Search Engine

Spi Read Problem

Add Question

59 Threads found on Spi Read Problem
Hi, I've got some 2GB and 1GB micro SD cards that returns 0xC1 to CMD25 and 0xC2 to CMD18. They don't accept any write or read. Any other micro SD returns the expected response on my hardware. It's a Mega8 talking to the card via spi. These cards also work ok on W7. Any ideas? Thanks.
You need to understand that spi is an exchange protocol - white you are sending the bits of a value from the master to the slave device, the slave will be sending you bits. Therefore you DON'T send values and then read values - you do it all at once. Typically you need just one function to perform an spi exchange, at least from the master (...)
Your question and problem is not clear to me, but I'll try to answer from the bits & pieces I have understood. 1. where I am suppose to connect another 2 unconnected pins(STARTUP_IO and ip2intc_irpt). Study the spi IP spec carefully, it would be written there how these pins can be connected (don't have time to read the spec and
Mcu also used PCD (proximity coupling device or the card reader) for R/W RFID tags, Connection between PCD and MCU is based on spi,Becouse of unsecure and un-encrypted connection between them ,each attacker can sniff the connection and achieve the keys used for reading and writing to the RFID tags. what is your suggestion for this? WBR
maybe your ADC is being 'selected' and interfering the communication between the programmer and the micro... please read the datasheet of your ADC and check the correct value for and idle Chip Select, most spi interfaces (and by the name nCS) uses the Chip Select (pin CS, SS) as active low, that means that most of the time it should be logic 1 and
HI there, any help would be appreciated.. I am trying to read from the AD0831 ADC through the spi inteface in proteus lite sim . It seems that I have set the correct flags and every thing but the ADC doesnot communiccate with the micocontroller at all. This is my configuration: SCK is RC3 SDI is RC4 SS is RA5. I think the algorith
can you pls be specific, do you need example or need to check any problem you are facing If you need example kindly refer to this site And if you have any problem pls explain in detail to look at.
i am trying to read interface L3G4200D gyroscope with Lpc2148. As i am new to THIS field, i am not understanding what is the problem with my code. please can somebody assist me in this. i am posting code.. #include #include #define rs (1<<0) #define e (1<<1) #define drdy (1<<7) #define cs (1<<16) vo
A problem with increasing the clock and processor speed is that the peripheral clock will increase as well this would lead to you having to change UART baud rate counters, timer counters, etc (plus I2C, spi, CAN, ????) also if you are using delays using simple loops, e.g. to slow read/writes to an LCD or similar device, these can cause (...)
I can't remember where I read this but it is what I do and have not had problems. You should disable the spi module (SSPEN=0), do all the spi configuration (mode, speed, etc.), then enable the spi module. The way your code is written (assuming I remembered correctly), the spi module is using (...)
That's what spi_read() does. It's sending 0x00 as dummy data. There are detail problems like the usage of the start character, but I don't see a basic problem with the master code, provided the slave can keep the byte rate. Yes, I see that now. This way to do it is a bit alien to me, since I always use to exchange outgoi
Hi i'm working on spi communication between atmega168(master) and atmega16(slave) the problem is that the slave receives what the master send but the master can't read what the slave r the codes: Atmega 16: #include #include #define SETBIT(ADDRESS,BIT) (ADDRESS |= (1<
I have a FPGA pulse generator design that is connected to a STM32 board with spi and I am having a strange problem with sending / receiving data. The basic operation is that I send a quantity of pulses to the FPGA and then a frequency to pulse them at. The FPGA then counts them down as it pulses and I can read the remaining quantity back (...)
dear you have to read spi portion of ATmega32 datasheet. It is explained there
hello sir, I am new to this ADC and wanted to inquire a few stuffs to the spi initialization which method have you used hardware reset or clocking sync1 and sync0 commands.Also what else has to be specified in init_spi() function. Right now i just want to read the registers and not to write anything. Also in reset() function what have yo
Did you check whether your spi communication happens properly. Most of the time due to different problems in register settings, spi communication does not happen. Check the spi communication pins with an oscilloscope. If you can see clock lines and data lines work, then read the datasheet throughly for (...)
Hello all, I'm having a problem with the spi interface on a PIC18F4550. I am trying to read data from a 24-bit A/D converter (ADS1271IPWG4). I have set up the SSPCON1 and SSPSTAT registers and I am sending a byte through the SDO pin to the ADC to produce the clock signal on pin SCK that will synchronize the data transfer. When I measure (...)
I am trying to read data from ADXL3445 accelerometer using PIC18F4550. The ADXL345 supports both spi and I2C interfaces. I am using spi for my project. The code I am using for reading and writing data to ADXL is as follows : #define spi_CS LATAbits.LATA5 unsigned char POWER_CTL = 0x2D; //Power (...)
hi all i am trying to implement spi communication between two 16f877a. am giving my CCS code below for master void main() { TRISC=0x10;//SCK is output (Master), SDI is input, TRISA=0x00;//Slave Select Bit ADCON1=0x06; SSPSTAT=0x40;//Mode 1,1 spi, middle of output time sampling SSPCON=0x31;//Mode 1,1 spi Master, 1/16 Tosc bit, S
Hey guys, I'm using the energy measurement IC ADE7758 with the microcontroller mbed. Right now I know how to read/write registers and the spi communication is working Ok. My problem now is to make it ready to start measuring the CT to show the measured data. I'm using the current sensor SCT-019-000 ( ) with a resistence t
Dear all, I use Microchip C18 and have connected a 8 channel ADC LTC1859 to my PIC18F26k22. reading channel 0 works fine, but when I try to read from channel 1 or 2 or etc..., it always comes back to channel 0 despite sending the correct address for a different channel!!! It also s**** up the gain range... I am inclined to think (...)
hi ashkar, i understand u r trying to do spi bit banging. i suggest u to read spi protocol first. and please recheck the Din which u have used is for data receive or transmit. usually it will be used to receive data. pls post ur circuit diagram for better clarity.. finally when u do bit banging, u have to transmit data bit by bit. (...)
Hi all, I am able to initialize spi, Memory card as well but am unable to write files to SD-MMC card. How to write and read files to SD-MMC please help me to do this.
Hello! Apparently you start from scratch. You shouldn't expect to get a full blown application. Tell us _accurately_ what you did, what problem you have, etc... - Did you connect the accelerometer to the chip? How? - What accelerometer do you use? (which will give hints about the transmission, spi, I2C, or analog in case it's an analog sensor). -
have a look here: AN995 - Using the C18 Compiler and the MSSP to Interface spi? EEPROMs with PIC18 Devices - Application Notes - Details
I am trying to read and write FLASH and EEPROM of an AVR (atmega8) via ISP. I had programmed a PIC16F877A which accepts 8 bit data from UART (hyperterminal) and send it to AVR via spi at reset zero... I have successfully enabled the ISP mode by sending cmd(0xac, 0x53, 0, 0); also verified the return byte. Now I can write and read (...)
I'm new to controller and I'm having problem in interfacing ltc1854 with pic controller through spi. I tried to much, I'm sending data through controller, being checked by me on oscilloscope. The master (pic18f8680) sdo, read, clk, all are sending data, slave(adc) 'sdo' is not responding. Plz help. :!::cry:
Hi, I am trying to interface AT93c56 EEPROM to 18F4550.i'm using MCC18 compiler. The EEPROM is wired for x8 configuration. The problem with it is Every time I read EEPROM it returns 0xff only. My code is as below.. If any one knows the solution plz Help me.. #include #include<spi.h> #define read 0xc0 (...)
mmmm... I´mnot sure but shouldn't you initialize the master spi as ''master" ?
a few years ago I used a similar device attached to a PIC24 - it was an ISD4003 which has an spi interface this appears to be slightly different with the address being supplied via 8 address pins and Ax and Mx address/mode pins probably the best thing is to have a read thru the ISD2590P manual I
I don't know the MMA7455 but I have used the spi on the PIC24HJ and it is important to read the PIC24 errata sheet - some of the modes don't work. It may not be your problem but it's worth checking. Keith
Hi Make a simple test to check whether the spi connection with the 9834 is working Find a scratch register ( a register that you can read and from and write to ) Write the value 0x55 and read it back Do the same for the value 0xAA Whether you pass the test - your spi link is working well and you have a (...)
Hi! I have been trying to write data on my Kingston elite pro 512MB SD card but write always fails. spi mode initialization works ok and I can read the card size and card responds 0x00 to write command. problem is that I get CRC error response or no response at all depending from do i deassert&assert CS after write command. With (...)
Hi all, i am facing serious deadline problem and hope someone can offer me help. I am doing a three PIC16F877A system with one master controlling two slaves, the master will send data to slaves as one way communication to control the DC motor. The master will also read input sensor data as analog value. I am using spi to communicate (...)
I am building an MP3 player with MMC/SD card interface to a PIC18F4550 through spi, but I cannot get any response from the card, here are the details, anyone can help me? - When I read from the card, the MISO line is all the time high or "1". I expect to receive an R1 command or "0x01" but I see no movement on the line. - I am implementing the
Hello, I have a problem reading and writing to 25C080. I tried to read and write the 25C080 eeprom with PIC18F452 but not work. So I used the next code on 25C080 but did not work. Can any one help me on what to do? Please movlw 90h movwf 0xF94 ; set input TRISC ( RX and SDI) movlw 80h movwf 0xFC7 ; SMP=1 from SSPSTAT (...)
Try to use spi communication protocol. There you can use as a master slave operations. Regards Chanchal
Hi there!! I got into trouble trying to stablish a spi communication between my microcontroller and a DAC(mcp4822). I don't if setting low the LDAC pin will cause problems to my circuit. It seems that this pin is to sincronize the input and output latches. I don't need to read anything from the DAC, the only thing i need is to send data (...)
I have some problems interface with max3100 through spi. I used spi of PIC18F4620 to interface with max3100 and connect the pins TX,RX of max 3100 to RX,TX of PIC respectively. I successfully write and read the configuration register. For the write data, I successfully write the first byte of write data 0b10000000 and the (...)
Hello, Below are few design issue i would like to discuss here .. 1) is there any issue with spi comm. of 7753 chip if CS pin is not controlled by MCU.Because same routine works with cs pin controlled by mcu .But gives corrupt data if CS pin is tied to GND(low). a) My spi routine is bit bang oriented. b) There is only one device, ADE77
Hi I am trying to clock a continuous data stream out using the spi port (I never read anything back), ideally, I would like a 16 bit word with an interrupt to reload the spi1BUF every time it is empty. I set up the spi TRISF = 0x0140; CLKDIV = 0x0040; spi1CON1 = 0x013B; (...)
Hi Thest that the chip is working by checking the clock oscillator, current consumption , volatge applied , IO status at reset , spi access etc Whether all the test apply - you probebly have software or set up problem All the best Bobi
Hello everyone ,I am making a power meter based on ADE7753 IC . I started off 1 month ago ,had many problems in between.One of the major problem was spi communication . I have used PIC16F72 as the master controller.Now am able to read all the registers and also able to calculate voltage and current. I want to know (...)
I am using single spi port for FRAM & Flash. While using spi in main if interrupt occurs & if interrupt uses same spi port for read/write FRAM or FLASH collision occurs. Please suggest the solution to solve this problem.
hi all, i tried o/p port expansion using shift register 74HC595.But the code when i simulate it ,is not working.Still i tried it after programing.But it doesnt make ny change.i will give u the code.Please help me. ;program to read port B and send it to the shift register via serial mode data transfer(spi) ;using shift register 74HC5
Maybe you should post a schematic? You should use code tags when posting code. It is really difficult to read your code otherwise. Try this spi code: ;spi_Transfer spi_MODE1 ;transmits and receives a byte simultaneously in acc spi_Transfer: MOV R7, #08H ; Load R7 to count bits (...)
hi all can any one tell me how to delete at89s51 memory through Serial programming mode(spi mode:MOSI,MISO,SCK lines) i read doc2487.pdf per that, i sent Programming Enable command(0xAC,0x53,0x00) first and i get back (0x69).but my problem is i am not able to erase whole memory with the help of commands 0xAC,0x80,0x00,0x00. i confused in
Hi guys, I would some advice on display interfacing with microcontrollers spi interface. I would like to know things tht need to taken care before or whn designing interfacing btwn display and micontrollers. Do you guys ever run into any issue mayb regarding clocking, data boud rate? Appreciate your help.
Dear sir/madam, Presently iam working CYWUSB6935 module .i interfacing this module to the cy8c29866 microcontroller through spi.Initially i read all interal redister values of the module with test program it working fine i.e., iam getting all default values of the module. But if i keep one module in transmit mode and other module in rece
am having a problem in reading a block from MMC in spi mode. There is no error in response (R1...) during initialization. one data block is read but when i read another block the cards doesnot send the response Token.