我有一个想要开始的嵌入式项目想法。我有很多问题

发布于 2024-08-07 16:07:32 字数 939 浏览 7 评论 0原文

这是我在 stackoverflow 上的第一篇文章,我听说过这个网站,我认为它太棒了!让我们看看我是否可以获得一些关于如何开始我的项目的指导。

想法: 基本上我想构建自己的自定义 OSC 控制器(OSC 是基于 UDP 的协议,旨在取代 MIDI)。有趣的是,我想将控制器构建为吉他,因此我可以将其用作合成器,并在吉他主体上包含一些典型的 MIDI 控制器硬件。这将包括力度感应垫、光学编码器、液晶面板、力度感应琴弦和触摸感应音品。 这是一个示例

我的问题:我对如何启动如此规模和复杂的项目感到困惑。在基本的低级别,固件似乎只处理基本整数并转换为适当的 OSC 信号。我不确定如何选择我的硬件和编程语言,甚至不知道如何实现这个协议。也许我贪多嚼不烂,但我认为这是一个很好的项目,可以很好地理解嵌入式硬件的工作原理和低延迟并发系统的编程。

  1. 该设备基于什么良好的硬件平台?我认为 PIC18 处理 OSC 的速度会很慢,因为它是一种现代协议。什么类型的微控制器可以处理 OSC 实施?
  2. 用什么语言来实现这个协议比较好?我知道 C 通常用于嵌入式软件,但 Ada 激发了我的兴趣。这里的目标是创建一个低延迟固件,可以处理来自用户的多个输入。据我了解,Ada 在很多此类情况下都使用并且“更稳定”?您对此有何看法?
  3. 是否可以在没有物理硬件的情况下模拟硬件和微控制器?我有点犹豫要在硬件上投资几百美元而不知道它是否适合我的需求(我的预算是学生)。如果我能够在没有硬件的情况下模拟所有输入并编写固件,这将使我对完成这个项目的能力更有信心。即使能够模拟我的想法的基本版本也比什么都没有更理想。

我希望我能就此得到一些意见,如果我关于硬件的问题不适合这个网站,我理解你们是否在硬件方面给我提供建议犹豫不决。

再次感谢!

This is my first post on stackoverflow, I've heard of this website and I think its awesome! Let's see if i can get some guidance on how to start my project.

The Idea:
Basically I want to build my own custom OSC controller (OSC is a protocol based off UDP with the intention of replacing MIDI). What's interesting about this is that I want to build the controller as a guitar, so I can use it as a synth and include some typical MIDI controller hardware on the body of a guitar. This will include, velocity sensitive pads, optical encoders, a LCD panel, velocity sensitive strings, and touch sensitive frets. Here's an example.

My Questions: I am confused about how to start a project of this magnitude and complexity. At the basic low level it seems that the firmware would just be dealing with basic integers and conversion to the appropriate OSC signals. I am unsure of how to choose my hardware and programming language, or even how to implement this protocol. Maybe I'm biting off more than I can chew, but I think that this is a good project for getting a good understanding of how embedded hardware works and programming low latency concurrent systems.

  1. What would be a good hardware platform to base this device off of? I assume that PIC18s would be to slow to deal with OSC since it's a modern protocol. What type of microcontroller could deal with an OSC implementatation?
  2. What is a good language to implement this protocol in? I understand that C is commonly used for embedded software, but Ada has sparked my interest. The goal here is to create a low latency firmware that can deal with multiple inputs from the user. I understand that Ada is used in many of this types of situations and is "more stable"? What are your opinions on this?
  3. Is it possible to simulate the hardware and microcontroller without having the physical hardware? I'm a bit iffy to invest a few hundred dollars into hardware without knowing that it's the appropriate setup for my needs (I'm on a students budget). If I were able to simulate all the inputs and write the firmware without having the hardware it would make me far more confident in my ability to complete this project. Even being able to simulate a basic version of my idea would be more ideal than nothing.

I hope that I can get some input on this, and if my questions about the hardware are not appropriate for this site I understand if you folks feel hesitant on advising me on the hardware end.

Thanks again!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦开始←不甜 2024-08-14 16:07:32
  1. 支持以太网和可用网络堆栈的东西似乎是明智的。您是在寻找现成的主板还是开发自己的主板?许多 ARM 微控制器都包含片上以太网控制器。您需要考虑对网络硬件的支持,以及这种支持(或者实际上应用程序本身)是否需要操作系统或 RTOS。

  2. C 编译器几乎适用于从 8 位到 64 位的所有架构。然而,如果您使用具有超过几十 KB RAM 的 32 位部件,C++ 是可行的并且几乎同样普遍。 Ada 是一种较为罕见且缺乏良好支持的野兽,在我看来,在军事/航空航天之外将是一个不寻常的选择。您可能需要第三方支持,例如网络堆栈和以太网驱动程序 - 这些是否可用于 Ada;以合理的成本?

  3. 您可能不需要在指令或周期级别模拟硬件。如果使用 C 或 C++,您可以在 PC 上对大部分代码进行原型设计。优点是PC已经有网络支持。许多嵌入式开发工具链都包含指令模拟器,有些还模拟片上外设,但它们的用途有限 - 它们不实时执行,并且模拟外部 I/O 可能很复杂且不切实际。

**[编辑]**关于 C++(回应 Jason S 的评论)。这并不是说 C++ 一定需要更多的内存;而是说 C++ 一定需要更多的内存。您为您使用的功能付费。然而,需要小心,因为 C++ 变得简单且有吸引力的东西可能会隐藏资源成本。我在嵌入式系统中使用 C++,但很少使用 C++ 标准库 - 它很棒并且节省了大量时间,但在资源和确定性方面成本很高,某些系统可能无法承受。我已经在 8 位和 16 位系统上成功使用了 C++,但当使用的子集受到高度约束且代码体较小时,优势就不那么重要了。例如,我不会建议你学习 C++ 只是为了在 8 位系统上使用它;但如果您已经了解 C++,请继续(小心)。我目前正在开发 dsPICF33 设备,缺乏 C++ 支持非常令人沮丧。

  1. Something with support for Ethernet and an available network stack would seem sensible. Are you looking for an off-the-shelf board or developing your own? Many ARM microcontrollers include on-chip Ethernet controllers. You need to consider support for the networking hardware and whether such support (or indeed the application itself) requires an OS or RTOS.

  2. C compilers are ubiquitous for nearly all architectures from 8 to 64bit. However if you use a 32bit part with more than a few tens of Kbytes of RAM, C++ is viable and almost as ubiquitous. Ada is a rarer less well supported beast, and outside of military/aerospace would be an unusual choice IMO. You may need third-party support such as a network stack and Ethernet drivers - are those going to be available for Ada; at reasonable cost?

  3. You may not need to simulate the hardware at the instruction or cycle level. If using C or C++ you can prototype much of the code on a PC. The advantage being that PC already have network support. Many embedded development tool-chains include instruction simulators, some also simulate on-chip peripherals, but their use is limited - they do not execute in real-time, and simulating external I/O can be complex and impractical.

**[edit]**Regarding C++ (an in response to Jason S's comment). It is not that C++ necessarily needs more memory; you pay for the features you use. However care needs to be taken since things that C++ makes easy and attractive can have hidden resource costs. I use C++ in embedded systems, but seldom for example use the C++ standard library - it is great and saves a lot of time, but at a high cost in terms of resource and determinism that some systems may not afford. I have successfully used C++ on 8 and 16 bit systems, but the advantages are not so critical when the subset used is highly constrained, and the code body small. I would not for example suggest that you learn C++ just to use it on an 8bit system; but if you already know C++, go ahead (with care). I am currently working on a dsPICF33 device, and the lack of C++ support is very frustrating.

も让我眼熟你 2024-08-14 16:07:32
  1. 首先,请看一下 Arduino 和 Make 控制器。两者都是开源(硬件和软件)微控制器模块,可以处理 OSC 并拥有强大的用户社区。您可以在 youtube 上找到这两个示例视频。

  2. C 和 Ada 仍然会被编译为机器代码,因此如果您想最大程度地控制硬件,您可能需要考虑汇编语言 - 但只有当它变得绝对必要时。在那之前,我会坚持使用 C。它会带你走很远。

  3. 是的,可以在软件中模拟您的电路。然而,使用实际硬件,有些事情会变得更容易。但是,对于一些好的软件示例,请查看 Cycling '74 网站上的 Max/MSP 教程。 Max/MSP 是一种图形编程语言,经常用于计算机/硬件交互。 这篇文章将为您提供一些关于它的功能的想法.

  4. 与Max/MSP类似的是一个名为Pd的开源产品。它不如 Max/MSP 完善,但可以免费使用,您可以随时开始使用它。

  5. 对于初学者来说,几本好书是 Tom Igoe 的《物理计算》和 Paul Scherz 的《发明家实用电子学》。 Tom Igoe 还有一个信息非常丰富的网站。

  6. 一些对您有帮助的好杂志是《Make》、《Circuit Cellar》和《Nuts &》。伏特。所有这些都在某种程度上涉及您将用于此类项目的电子设备类型。

  7. 除非您正在为商业企业设计原型,否则您可能会考虑启动一个开源项目。这听起来是一个好主意,我相信它会引起很多人的兴趣。

  1. For starters, take a look at both the Arduino and Make Controller. Both are open-source (hw&sw) micro-controller modules that can handle OSC and have strong user communities. You can find example videos for both on youtube.

  2. Both C and Ada still get compiled down to machine code, so if you want the most control over your hardware, you might want to look at assembly language - but only when it becomes absolutely necessary. Until then, I would stick with C. It will take you quite far.

  3. Yes, it is possible to simulate your circuitry in software. However, some things are just easier with the actual hardware. But, for some good software examples, take a look at the Max/MSP tutorials on the Cycling '74 website. Max/MSP is sort of a graphical programming language that is frequently used for computer/hardware interaction. This article will give you some ideas on what it can do.

  4. Similar to Max/MSP is an open source product called Pd. It is less polished than Max/MSP, but being freely available, you can begin messing around with it whenever.

  5. A couple of good books for beginners are Physical Computing by Tom Igoe, and Practical Electronics for Inventors by Paul Scherz. Tom Igoe also has a very informative website.

  6. A few good magazines you might find helpful are Make, Circuit Cellar, and Nuts & Volts. All deal in some capacity with the type of electronics you would be using for a project like this.

  7. Unless you are prototyping for a commercial venture, you might consider starting an open source project. This sounds like a great idea, and I'm sure it would generate plenty of interest.

衣神在巴黎 2024-08-14 16:07:32

您可能想查看类似 gumstix。小型、低功耗、运行 Linux、无线且便宜!

看起来有可用的 linux OSC 库。你绝对可以在 Linux PC 上对你的应用程序进行原型设计,然后在嵌入式 Linux 平台上进行交叉编译。

You might want to look at something like the gumstix. small, low power, runs linux, wireless and cheap!

It looks like there are linux OSC libraries available. you could definitely prototype your app on a linux PC and then cross compile on an embedded linux platform.

强者自强 2024-08-14 16:07:32

还有基于 MIPS CPU 的 PIC32。我想说使用 Ada 是因为它具有实时功能,但您还必须移植运行时才能使其工作,除非您使用具有零占用空间配置文件运行时的语言,这也是可行的。

There is also the PIC32 which is based on a MIPS CPU. I would say use Ada for it's realtime features, but you would also have to port the runtime for it to work, unless you use the language with the zero footprint profile runtime, which is also do-able.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文