I'm trying to create a project that will allow me to control digital potentiometer using the .NET gadgeteer. They both use the SPI protocol so at first sight this should be easy.
The potentiometer is MCP4131:
http://farm9.staticflickr.com/8062/8240194093_87b2e5c9fb.jpg
and the gadgeteer socket is:
Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Pin 10
+3.3V +5V GPIO! GPIO GPIO GPIO MOSI MISO SCK GND
Unfortunately, I can't understand how to connect these two together.
Furthermore, I Don't really know how to program the gadgeteer in order to control the potentiometer.
Any help would come in handy,
Thanks in advance!
I have no experience controlling SPI (so don't mark this as the answer for at least a few days) but I did find example code showing how to program SPI interfaces through Gadgeteer on the GHI site: http://www.ghielectronics.com/docs/14/spi
It is also worth noting this post on the Gadgeteer CodePlex pointing out that to get the SPI library in 4.2 you need to add a reference to Gadgeteer.SPI to the project: http://gadgeteer.codeplex.com/discussions/362536
(N.B. I have not found StackOverflow a useful site to get help on Gadgeteer questions. I hope it gets better. In the mean time I have been posting questions on the GHI Gadgeteer Forum https://www.ghielectronics.com/community/forum/board?id=21 and finding I get useful and knowledgeable answers there.)
Related
Hello StackOverflow community,
I've been stuck on the following problem for a bit and would greatly appreciate a bit of help. I apologies in advance for my lack of knowledge about USB in general:
My goal is to use a USB3 port to transmit super-speed data between a computer and another device without having to use the D+/D- USB2 pairs (the reason is that I have 2 optical fibers only!) . In practice imagine an active optical cable which would only be able to transmit the USB 3 super-speed signals -> no D+/D-... both sides of the active cable are of course powered individually. The active cable has on both sides as I/O the copper differential pairs of the super-speed signal as well a source of power.
Both ends of this link are an issue for me at this stage: on computer side is there a way to tweak some kind of USB3 driver to ignore the typical host-device construct which I understand is imposed by the underlying USB2 protocol - a kind of by-pass? On device side... well same thing I guess - I haven't yet figured out implementation option.
Any thoughts are welcome!
Thanks a lot!
Grégory
I am a student, currently doing my internship and working on arduino mega2560 and Dragino LoRa shield v1.3. I was searching the data sheet for Dragino LoRa shield v1.3 on the internet, but I have been unsuccessful to find any. I have Sx1276 chip data sheet (http://www.semtech.com/images/datasheet/sx1276.pdf)used in Dragino LoRa shield v1.3 board. But there is no proper data sheet for the entire board. Can anyone help? I want to understand the pin configurations and pin mapping. There is another resource I found on GitHub, however, it is quite hard to understand (https://github.com/dragino/Lora/tree/master/Lora%20Shield/hardware/v1.3). Any kind of help would be greatly appreciated. Thank you.
Here you can see pretty much anything you want.
https://github.com/dragino/Lora/blob/master/Lora%20Shield/hardware/v1.3/Lora%20Shield%20v1.3.sch.pdf
You have to understand: The Square in the top left is your board. You can see every connected Pin has its name for example pin 14 is CLK. You can search for the CLK on the RFM95 and you will see it is pin 4.
Hope i helped you
The corresponding relationship between sx1278 chip data sheet and the sheild board is showed in the scheme.
In fact,you just need to know the sheild pin is connected in the default way when it is inserted directly in the mega 2560,but the ss pin (DIO 10 of the sheild board )maybe should be connected with DIO53 of mega 2560,you can try it.The default way you can refer to its introduction on Wikipedia.
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 am using 4 AD9833, in which the 4 fsync signals are sent from atmega2560. I want to generate different frequencies from all the 4 AD9833, if I program it, I am getting some frequencies in 2 port pins, I could not change the frequency .. please help
For the Atmega2560, you may want to look up "SPI" programming at here:
http://arduino.cc/en/Main/arduinoBoardMega2560
Using the SPI library, u can then issue command to the AD9833 via SPI interfacing. For details lookup page 2 here:
http://www.analog.com/static/imported-files/data_sheets/AD9833.pdf
(and page 15 above described the details on specifying the frequencies).
More information on SPI programming for Atmel is here: http://www.atmel.com/Images/doc0943.pdf
For SPI example for Arduino:
http://www.youtube.com/watch?v=YE0wnom_7As
http://arduino.cc/en/Tutorial/BarometricPressureSensor (look for SPI.begin(), SPI.transfer() etc).
For the SPI library specification:
http://arduino.cc/en/Reference/SPI
I have this samsung chip on a board (samsung s3c2510a) and I want to program to it via some method. However, I don't have a jtag reader on me and this board has a usb port. Is there any way to tell if I can program to the chip via this usb port? I ripped the board off a color laser printer by samsung and the board also has an ethernet connection.
Also, this board has 4 pins called "cn4 debug". Would this be of any use?
Here is a pic: http://imageshack.us/photo/my-images/262/img20120527120306.jpg/
Thanks,
Rohit
I doubt programing this board would even be posible. You could check if there is any software that is used to update the board (from the manufactuter) and try to reverse the protocol. You would also need to figure out the format of the firmware file. There is a lot of good stuff on hacking router firmware that may help. You should be able to find some mailing list to ask for help on.
For any device to be programmed over USB or indeed any port that is not part of the on-chip programming/debug architecture requires software/firmware supporting that port to be present on teh chip already. Some microcontrollers include ROM based primary bootloader code for this purpose. The S2C2510A has no such bootloader. But if the board already has software on it, part of it may indeed be a bootloader. However unless you can get information on the protocol used, you do not really have much hope.
A picture of the board does not really help; what you need is a full data sheet and/or schematic. You'll also want the data sheet and user reference manual for the chip itself. You don't really have much hope of making sense of this board without them. The board does not look like a development board to me, so board specific information may not be available.
CN4 merely means "Connector Number 4". Having just four pins it is likely that it is merely a connecting to the Console UART - a minimal low speed serial data peripheral on the S3C2510A.