Note:
The BBB has tons of possibilities. But the GPIO pins must be chosen with care. I am running for example Debian on the intern eMMC. That means that we can not use on P8, 3-6 and 20-25, as GPIO. An other example is the HDMI. By disabling HDMI there will become 20 pins free (P8, 27-46). So in my case I lost already 30 pins for GPIO because of the use of eMMC and HDMI.
SPI can only be used without HDMI.
In Proview:
Digital Output :
Tried with 3 LEDs and 470 ohm resistors, works..
Analog Input :
7 Multiplexed 1.8V analog inputs going to a 100KHz 12-bit ADC (the eighth channel is used by the system). Because of the 1.8 Volt limit, 11-bit for the linux driver (0-2047)
Tried AIN1 with LDR and 10k Ohm resistor. Setup as voltage divider. I used VDD_ADC1 pin (P9, pin 32), steady 1.8 Volt. Converted between 0-1.8 Volt.
In Proview I read the value in from /sys/device/ocp.2/helper.14/AIN1 by using an onewire-AiDevice in the node configuration. Using Ai's in Proview with the BBB uses lots of CPU resources using a PLC scan time from 100 ms. A second plcprocess in node with for example a PLC scan time of 1 sec for slow data sampling is a way to press the CPU resources down.
"Works"......
PWM:
I am running kernel: 3.8.13-bone20
Pretty confusing, lots of people have problems with PWM.
eCAB driver, eHRPWM, SYSFS interface, Device Tree.... Lots of changes the changes in Linux > 3.8......
-------------
I have build a new kernel, based on 3.8.13.
PWM, period= 500 microseconds (2 kHz), which is default, with a variable duty.
used: /sys/devices/ocp.2/pwm_test_P8_13.15/ as test and is working.
At the moment I have 6 PWM's working with Proview; P8_13, P8_19, P9_14, P9_16, P9_21 and P9_22. The BBB has 8 PWM's so I still miss 2. I have set the polarity to "0" of the PWM's.
The 1A/B and 2A/B PWM outputs pairs are coupled and synchronized, they can only have the same period . If we use a pair the period of the duty starts on the same time of the 2 outputs.
OK. Sysfs is great if you don't need speed. But one thing is for sure I want to move to /dev/mem. By mapping the GPIO to /dev/mem our dreams can become true. Please use the guest book for ideas.....
Next step is to find a mosfet with a threshold voltage < 1.8 Volt.....
18-2-2016
Blow the dust of the BBB and started to read about the PRU possibilities of the BBB. GPIO by using the sysfs is sometimes too slow...
A programmable real-time unit (PRU) is a fast (200-MHz, 32-bit) processor with single-cycle I/O access to a number of the pins and full access to the internal memory and peripherals on the AM3358 processor on the BBB.
Started with 7 analog inputs (AIN0-AIN6).... Looks promising....