What is the difference between mipi dsi and spi? - sensors

In terms of working on microcontrollers and microprocessors, I have been said to work with SPI Interface instead of using USB. When I was going to deeper on my hardware selection, I have noticed that there are many other Interface like MIPI Dsi, Csi or so on. So what are differences? Can I choose something with mipi dsi interface and use it on my system which will be a sensor system?

Your question is rather broad for Stack Overflow and has a really wide scope; but fundamentally, all the interfaces you've lists, SPI, USB, MIPI DSI, MIPI CSI, etc, are all just communication interfaces, or ways for external components like sensors, cameras, displays, input devices, storage units, etc to talk to a processor; each usually being designed with specific goals in mind. USB for example was designed to be generic and used to connect peripherals to desktop/laptop consumer systems from keyboads and mice to webcams to other devices; while MIPI DSI was specifically designed to interface mobile/embedded displays to the host processor. Due to these design goals for each interface, they all have quite different physical and link-layer implementations (ie, the actual number of wires and the way the signals on those wires are sent and received).
When looking to which interface is right for your system, you need to look at what the processor supports and what interfaces the device you wish to hook up to it supports. If say, you have a simple accelerometer and a simple microprocessors, its likely both with use either a SPI or I2C interface. If its a larger processor and a camera, then either USB or MIPI CSI might be good options. Also recognize that depending on software support, writing code to interface with a USB sensor can be quite a bit more complex than one for a SPI interface (thus the widespread use of SPI and I2C in embedded systems). Without more details, I cant say whats a good way to hook things up (and that type of question might better fit on electronics stackexchange: https://electronics.stackexchange.com/).

Related

redhawksdr Using Redhawk persona devices, I need a 'how to'

I am looking into persona devices as described in Appendix G of the Redhawk manual.
Is there a detailed "how to" for this anywhere?
In my scenario my 'Programmable Device' would be a Redhawk FEI device that interfaces with a kernel API that controls tuners, fans, gps, buttons and LCD displays. I would like to break this out into three or four persona devices that interface with the main FEI Device.
Thought I'd ask.
If you head to Geon's github and look at the RFNoC_ProgrammableDevice and RFNoC_DefaultPersona, you can get an idea of how these Devices interact with one another. It should be noted that these Devices are still under development. Unfortunately, the manual appendix you mentioned and these examples are really the closest thing to a "how to" there is right now.
That being said, this pattern is generally reserved for FPGAs, with the programmable Device controlling access to the programmable hardware (and FEI functionality, if present) and the persona(s) controlling access to specific bit file capabilities. If you're not interacting with an FPGA, then the pattern will most likely be more trouble than it's worth to obtain modularity.

Modifying Bluetooth Low Energy Beacon

I was wondering if it is possible to modify the contents of a BLE beacon to include extra information. If you insert an extra bit at the end you could potentially broadcast a boolean in one direction. Theoretically, if you modified your device to read the extra bit of information this would work. Given existing protocols though it sounds like this would be a lot of work. Is there something out there like this already?
For info, I'm working on the mbed platform where you can modify your own bluetooth beacon payload.
Yes, you can do this with the new AltBeacon specification. There is a one byte manufacturer reserved field which you can use for whatever you want (tied to your manufacturer ID).
There are reference implementations of the specification available for Linux to show you how it works, and there is no reason you cannot implement it on the mbed platform.

How to get data from keyboard for Basys2 FPGA using VHDL?

As the title suggests, how can we get data from keyboard to Basys2 FPGA using VHDL?
I am sure with board came some reference implementation - just look at it, how they did it. What you need, is how the PS/2 pin connect to the FPGA pins (I am sure that is in some kind of ucf File). Then you have the signals and you can do whatever you want with them.
As E.g. Andy already suggested, you should have a look at PS/2 protocol if you really want to bitbang it (I would assume in their reference design, they have just some softcore on the fpga and handle it more or less in software).

How would i program analog to digital conversion using a microconroller in c

Im doing a dsp project and i want to take an anolog file and convert it to a digital output using a microconroller attached to a ADC on a dsp board. How would i program this in c?
Pretty much its as simple as that, atleast i think.
This is what i need.
Input --------- Output
Angolog --> Digital
Digital --> Anolog
You really need to clarify your question. Like what do you mean by analog file? File systems are binary from a programming perspective, sure the media is magnetic or other technologies and there is analog involved. An ADC goes from Analog to Digital, so it is an an analog input not a digital output.
ADC analog to digital converter, takes analog inputs to the device and converts them to digital so you can use them inside the chip, program, save to files, etc.
DAC digital to analog converter, takes digital values and converts them to analog outputs.
In both cases you need to look at the specific details for the chips and the board. From a programming perspective if nothing else you need to look into the details for the ADC and or DAC. Microcontrollers having an ADC is not uncommon, but you need to read up on how to get the ADC on that microcontroller to initiate a sample, how to know when the sample has completed and how to read the digital data once the sample has been taken. DACs are often external, sometimes serial, so you may have to bit bang spi or i2c or look into what hardware the microcontroller might have for speaking spi or i2c or if there is a dac in the microcontroller, how to use it (what registers to write, etc).
If you have a specific publicly available microcontroller board, for example an eval board, then that makes it much easier for folks here or elsewhere to show you where to look for the schematics, data sheets, etc. Otherwise, even knowing exactly which microcontroller and what I/O pins are used, would be helpful when asking such a question. There are probably lots of example programs out there that could be borrowed from. And it could be as simple as a few lines of C to an existing library, or as complicated as many lines of C with interrupt service routines, and possibly some assembler.
This is extremely dependent on your hardware and there's no information in the question that would enable a real answer.
In general, you should see the documentation for your system, especially the AD/DA parts. There should be good examples. If there's a particular problem, post a more specific question.

Starting FPGA Programming [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to start FPGA programming. I don't have any knowledge at all about how FPGAs work and such. I would like to get a development board, not too expensive, but it should have at least 40 I/O pins. Anything up to $300 is OK.
I decided that I want to program in Verilog. I am not sure about the following:
How will my compiled 'program' be stored on the chip? I would guess the chip has some kind of EEPROM to save my program, but from what I have read, it is apparently stored in RAM. I want my program to remain on the chip (or to be loaded somehow) every time it powers up.
Can I buy a separate FPGA chip (not a whole development board) for production? And if yes, how can I upload my program to the separate chip? Does it in some way connect to the development board?
I'd recommend the Digilent Basys board as an introduction. It only has 16 external I/O, but it already has RAM, USB, switches, buttons, LEDs, 7-segment displays, a VGA connector, and a PS/2 connector onboard - You're unlikely to find an FPGA with fewer than 40 I/O pins. If you want I/O for another project, use the Nexys instead - More peripherals than I care to list, and also has a high-speed Hirose 43-pin connector if you have a project which specifically needs about 40 connections.
Also, consider how you want to interface with your PC. Is your goal to make an embedded system, or to interface with a computer through a PCI/Ethernet/USB connection?
Yes, you can buy separate FPGA boards for production - There's a dizzying array of options, though - Digikey has 5,300 at this time. You do need some way to program the FPGA, and an onboard NVM chip that programs the FPGA on startup is a popular option. However, you should start with a development board that's well supported and already has a programmer, toolchain and simulator available before you get too far into designing your board or worrying about how to save your program onto the chip. Those are good things to know, but they're not what you want to worry about right now. Good luck!
The whole point of using an FPGA is that your "program" is actually a circuit, not RAM. There are physical logic components that are configured when you write the bitstream to the FPGA. This is why they can run so much faster for specialized applications--you are basically making custom hardware.
Xilinx is one of the main FPGA manufacturers. Try their website. Check out the Boards & Kits section.
Try reading more about the technology before you get ahead of yourself. You will need a strong understanding of how FPGAs work before you can program them effectively. Wikipedia is a great place to start.
In Xilinx FPGA terminology the "program" is called bitstream. There are some FPGAs that have embedded flash to store the bitstream (e.g. Spartan 3AN). Most of the FPGAs require some external bitstream storage. Here is a configuration guide on how to configure an FPGA.
Yes you can. There are multiple ways to do configuration. Most of them require some external circuitry.
Check out Actels's new Smart Fusion FPGA. Its has a FPGA fabric of course, with a hard ARM MCU with a good analog end (DAC, ADC etc).
The Eval board is only 100$
http://www.actel.com/products/hardware/devkits_boards/smartfusion_eval.aspx
And all the software you need to get up and running if free.

Resources