I am trying to illuminate LEDs using NCV7751 IC over SPI. I kept baud rate of 5 Megabit/second as datasheet mention
SPI is working fine, I tested it already. All the pins are connected correctly I double-checked.
0xff, 0xff, 0xff, 0xff is received back every time.
Does anyone know what can I do to fix this issue? Thanks
Hey Guys I found the issue, pin 24 needed 5v and I had 3.3v connected.
Related
I am using MC3635 Evaluation Board(EV3635B). There is no problem about SPI connection and i can read X,Y,Z movement via SPI. But i can not use interrupt pin as output. I want that let interrupt pin of the accelerometer give me HIGH when there is a tapping or movement and let me turn this interrupt pin LOW via SPI when i read this changing. Because i am trying to wake my microcontroller by this movement. Additionally i am using PIC12LF1822 but it is not a necessary information. Could you help me to configure the registers of the accelerometer?
Best regards.
I'm using the SparkFun nRF52832 Breakout to use the RTC signal for a sensor pressure clock line.
Unfortunately, on the two RTC pins, there are no signals. To verify this point, I used an oscilloscope to read pins 0 and 1.
Besides, I also created a sketch on another pin to generate my own square signal close to 33.333kHz, and I saw it on the oscilloscope.
I understand according to this tutorial that I do not need to modify the hardware.
RTC-EN - Connect/Disconnect the 32.768kHz Crystal
The nRF52832 Breakout equips the chip with a 32.768kHz crystal – connected to GPIO pins 0 and 1. Unfortunately, those pins make up a quarter > of the available ADC inputs. So, if your application doesn’t require an RTC – and you need those pins to for another purpose – grab a hobby knife and cut the two traces between their pads to disconnect the crystal.
Maybe I need to init the RTC pin with a dedicated method, but which one?
Could you provide me a link to any tutorial?
Any ideas what I'm missing here? What is my misunderstanding?
I am looking at the pin-out here: http://www.ti.com/lit/ml/slau536/slau536.pdf and can't find p1.0 and p1.1. Where are they?
The reason (perhaps, stupid) why I started looking for these two pins is because I need to connect RX and TX of a UART somewhere on the launchpad, and p3.3 and p3.4 did not work, and on some loosely related pinouts of other boards such as this: http://energia.nu/Tutorial_DigitalReadSerial.html p1.1 is RXD and p1.2 is TXD (not sure what's the difference between RX and RXD, assuming for now they are the same). So I thought maybe I try these pins and try my luck there? And now I can't find them.
BTW, the pinout shows that p3.3 and p3.4 are UART RX and TX on BoosterPack standard, which I don't have, and on the launchpad these pins are UCA0RXD and UCA0TXT (also, they are apparently UCA0SOMI and UCA0SIMO). I don't know yet what these abbreviations mean, and also, why there are two sets of functions on the same pins and how to switch between them.
My launchpad (in subj) documentation says it supports up to 4 hardware UARTs. Where? And why then is there a UART on booster pack?
Maybe p1.1 and p1.2 are taken for the launchpad's onboard backchannel UART?
If you want to know where every pin goes on this board then you should look at the schematic in the User's Guide. But more importantly, you should get familiar with the datasheet for the microcontroller on the board.
You don't see P1.0 and P1.1 because those pins are not brought out to the booster pack headers (connectors). Those pins are used within the launchpad board for something else. (They are not even UART pins as you hoped.)
P3.3 and P3.4 is the only UART connection that you have available through the booster pack headers. The other UART is on P4.4 and P4.5 and those pins aren't brought out through the headers. So you should probably try to get P3.3 and P3.4 working. Did you download TI's example software for this launchpad? There is probably an example program that uses the UART.
P3.3 and P3.4 are multiplexed as are many GPIO pins on typical microcontrollers. These particular pins can be configured as GPIO, a UART, or an SPI port. SOMI and SIMO are abbreviations related to the SPI function. Your code will have to configure these pins for the UART function. Read the datasheet and study the example software to learn how to do this.
I'm not sure where you saw four UARTs. The microcontroller on this particular launchpad has four serial interfaces but only two of those interfaces are designed for UARTs. The other two serial interfaces can be SPI or I2C.
I have been working on a PIC18F45k20 running at 16 MHz and using it as an SPI slave. I find that no matter the SPI clock rate (SCK) from the master I always have to add a significant delay (~64 us) between SPI bytes to avoid SPI collisions or receive overflow. Without the delay and at very slow SPI clock rates, 95% of the SPI packets will get through without collision or overflow.
Online posts lend me to think that this may be a "feature" of this, and other, PIC18 processors.
Have others observed this same slave “feature”?
If this is a “feature”, is it found in all PIC18 processors?
I tested the PIC18 without an interrupt with the following:
if (SSPSTATbits.BF)
{
DataIn = SSPBUF;
SSPBUF = DataOut;
}
Also tested using an interrupt and saw the same challenge.
Makes me wonder if it doesn’t truly detect the SPI clock properly.
If you have an oscilloscope check to make sure that the chip select is not being released prior to the PIC clocking out the last SPI data byte. You need to wait on the SPI busy bit before releasing the chip select line.
As I know PIC18 is a 8bit microcontroller, although you can easily find that it's integer variable is mapped into 16bit. However SPI works with 8bit data. It means if your master send for this microcontroller more than 8bit, such as 16 bit, overflow happens in SPI module and cann't response to master clock anymore. So In Slave mode, make sure data from master have 8bit structure. But if pic18 was Master in SPI connection, even though its slave send 16bit data, pic18 hold clock data after first 8bit and wait until its buffer read and empty for next 8bit.
I've also come across this issue and it seems like what one should take into account is that supported SPI simple tells how fast MCU can receive one byte into SSPBUF.
Reading this byte from SSPBUF and storing it in a buffer will require some work like incrementing a pointer etc., which will take some time. This is what reduces actual SPI bandwidth for multi-byte SPI.
I have an antenova part no. M10382 that I am attempting to control with an Ethernet Arduino. I can get the unit to send packets over its USB channel but not over the UART channel. I have tried sending the unit CR/LF at 9600 baud with no result.
Has anyone used this module?
This GPS module is 3.3v, are you giving it 3.3v power and 3.3v on the GPS rx pin? You may have fried the module (or that pin) if you plugged it directly into the Arduino.
Once you have it wired correctly (3.3v), then try this excellent GPS library. Try the example code to debug your problem. You should only have to plug in 3.3v VCC, GND and finally the tx pin of the GPS into a digital input pin on the Arduino.
Good luck.