Search Engine

338 Threads found on Spi Pic
Now it is correct. During first byte transfer spi slave decide to obtain control on IO or not. If you are reading some value, you send read command, next byte IO switching from 3-state to output and MOSI (SDO) signal becames ignored due to high resistance compare to IO because of resistor.
You don't need MISO line for unidirectional data transmission, but slave select for frame synchronization. The thread title is contradicting the actual implementation, you say USART but have spi interface.
Be careful when debugging the SSPBUF register as it is not a 'standard' SFR. What you read is what the spi peripheral last received - and a second read may or may not return the same value (this behaviour is undefined for (nearly) all of the pic chips of all families). It is almost certainly not what you would have written into the SSPBUF register
From MCP2515 datasheet 12.0 spi INTERFACE 12.1 Overview The MCP2515 is designed to interface directly with the Serial Peripheral Interface (spi) port available on many microcontrollers
Hello! My pic runs at 32MHz. How much us would it take to read a block? What block size? It depends on the spi flash and also how you program your ?P. If you use a 80 MHz flash in spi, then you can read 10 MBytes per second (in regular spi). As many chips have blocks of 256 bytes (some are 264), then you can (...)
i want to interface both spi and i2c devices in same pic microcontroller suppose if we have a possibility to change pins of i2c how can i plz help me
So could you tell me how to proceed? I made a search on the Web for ready-to-use codes by using the criteria "C+library+spi.H", and it is odd that did not result in so useful websites. The only place where it was possible to quickly find some libraries with bit handshaking it was exactly on the Microchip's websi
Hello! I'm trying to connect to the microcontroller pic12F1822 to the DAC MCP4921, and temperature sensor TC72 with LCD display. But it looks like the conflict in the code is obtained with a display or a temperature sensor. I want to ensure that when a certain temperature DAC gave the correct voltage. I have a table of values depending on the v
(1) How can spi multiplex SDI and SDO and use same pin for both since data is only clock at a single edge on both pins? I read the datasheet for MCP4131 for the first time and have been introduced to the concept of multiplexing SDI and SDO. The datasheet gives diagram for how this component maybe connected to a microcontroller on pg.41 of the datas
Hi, * Read datasheet of 595 about voltage and timing * Read pic datasheet spi section (If you pic donīt have spi, then read about software bit bing spi) * Now you should be able to draw a schematic * This is discussend many times in this forum. Please do a search "pic 595". * Read through (...)
Hi all.. I am doing a project using pic167873a interfaced with GSM and GPS.The GSM module is interfaced with pic using UART. We are using mikroC. Not getting codes for GPS interface using spi. thanks in advance
There are many solutions you could select according to your wish. For instance, you could use the digital blocs of the CY8 device to build some spi master device, or even use the already built-in I2C master peripheral present. At the pic side, you could build a soft slave and use some of the interrupt I/O pins to handle the CLK/DATA signals coming
Hi, I need some help to guide or overcome the error in writing coding that I have using MPlab. Actually, I want to use dspic30f6010A as spi Master, Frame master to communicate with my programmable waveform generator, AD9833. I would like to produce sinewaveform with 2MHz. Before this, I'm used the CCS C Compiler software to write the c
Hi guys I'm facing problem interfacing serial dac with picf2550. i tried simulation, it works but hardware is not working. Actually I'm trying to generate modefied sine and cos waves. I think there might be something I'm doing wrong with configuration bits or may be spi is different. Need suggestion. P.S: i tried the same code with a few change
Hi all , I have written code for pic18LF24K22 to work as slave. When I sent data from spi master(CHEETAH Adaptor) it is not able to receive the data. So I checked input functionality of receiving pin by just forcing vdd to that pin and checked the port value in register , it was showing 0. So same thing i tried on my pic18f45k20 evm (...)
74hc165 if spi if prefered
Hello , Since I am very new to microcontroller, can anyone please send example code on spi of pic18f45k20.??I am using MPLAB IDE and pickit debugger. My actual task is as given below. Here pic should act as slave and the soon it receives command from other spi ( using chita adapter command will be sent) (...)
Can't you use hardware spi instead of bit-banging to send the data? My suggestion was to try the settings in post #6. If they have any effect you are probably motivated to read about prefetch and caching.
Hi, GND and VCC should be clear. MOSI, MISO, SCL also. CE0 is the chip select for the spi interface. Connect it to a pic output port. RST is the reset pin. If you need the reset function then connect it to a pic output port. INT is the interrup out of RC522. If you need it connect it to a pic interrupt input port. Klaus
Hi everyone, I need some help for those who have experience in generating sine waveforms using AD9833 and pic18F4580. This is my first experience using spi to code the sine waveform from pic18F4580 as a master and AD9833 as the slave. I set the pin between pic18F4580 and AD9833 as follows: RC4/SDI/SDA ---- (...)