Go to advanced search

by bgreat
Sat Feb 09, 2013 6:12 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 109978

Re: Nokia Pi LCD

Did a quick update to the C++ code posted above by Sector7CSD to use the spidev hardware interface. This is a quick hack and proof of concept and could use more/better error handling... main.cpp: // main.cpp // code by: Chris // --------------------------------------------------------------------- #...
by bgreat
Fri Feb 08, 2013 6:55 pm
Forum: Python
Topic: Nokia Pi LCD
Replies: 253
Views: 109978

Re: Nokia Pi LCD

texy wrote:That's cool!
I know very little of C++ - is it actually using hardware SPI ?

Texy
It's banging the bits. :) It would be easy to convert to use hardware SPI though. ;) Maybe a weekend project for me...

Enjoy!
Bill
by bgreat
Fri Feb 08, 2013 1:27 pm
Forum: Linux Kernel
Topic: Strange behaviour of kernel module
Replies: 17
Views: 3419

Re: Strange behaviour of kernel module

Are you running the application as root via sudo?

Enjoy!
Bill
by bgreat
Thu Feb 07, 2013 2:57 pm
Forum: Linux Kernel
Topic: Strange behaviour of kernel module
Replies: 17
Views: 3419

Re: Strange behaviour of kernel module

I have tested GPIO 23 on all three of my Raspberry Pi boards Model B 256MB (x2) and Model b 512MB (x1). The GPIO works as expected for both input and output. Have you tried testing GPIO 23 independent of your kernel module with LED output and switch input tests? If this works, it can only be assumed...
by bgreat
Thu Feb 07, 2013 12:43 pm
Forum: Other projects
Topic: Nokia N900 screen...
Replies: 2
Views: 2110

Re: Nokia N900 screen...

According to Wiki entry for RPi Screens , this is a DSI interfaced LCD . It is not currently supported by the Raspberry Pi. There is a DSI connector that is intended for interfacing to a Foundation supplied LCD screen in the future, but there is insufficient information available to use it for other...
by bgreat
Thu Feb 07, 2013 1:04 am
Forum: Automation, sensing and robotics
Topic: mcp3008 bigbanging vs hw spi and tmp/photocell sensors
Replies: 4
Views: 2223

Re: mcp3008 bigbanging vs hw spi and tmp/photocell sensors

I have some updated Python spidev code if you are interested, send me a PM and I can email it to you.

Enjoy!
Bill
by bgreat
Wed Feb 06, 2013 9:14 pm
Forum: Русский
Topic: Светодиод и резистор!
Replies: 2
Views: 8718

Re: Светодиод и резистор!

Вы должны использовать резистор для ограничения тока. Для типичного красного светодиода, падение напряжения составляет около 0,7 вольт.Другие 2,6 вольта должны быть учтены в Raspberry Pi. Это потребует очень большого тока - по сути, короткое замыкание - превышение рейтинга для вывода GPIO. Чтобы пре...
by bgreat
Wed Feb 06, 2013 7:01 pm
Forum: Automation, sensing and robotics
Topic: mcp3008 bigbanging vs hw spi and tmp/photocell sensors
Replies: 4
Views: 2223

Re: mcp3008 bigbanging vs hw spi and tmp/photocell sensors

Take a look at the C and Python code posted for the Gertboard. It has a MCP3002 (2 channels instead of 8) and the examples use the SPI interface. The C code use direct SPI register level access, while the Python examples use the spidev interface.

Enjoy!
Bill
by bgreat
Wed Feb 06, 2013 1:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 74HC595 EMC(EMV) problems
Replies: 20
Views: 6619

Re: 74HC595 EMC(EMV) problems

I would place a 1K pulldown resistor to ground on STCP, DS, SHCP, and a 1K pullup resistor (to 3.3v) on /OE. This provides some additional noise immunity and gives a known level if the Raspberry Pi GPIO's are set as inputs.

Enjoy!
Bill
by bgreat
Wed Feb 06, 2013 1:45 pm
Forum: Python
Topic: Simultaneous python commands?
Replies: 5
Views: 2631

Re: Simultaneous python commands?

What you are wanting to accomplish can accomplished using Python threads -- parallel execution of tasks. In its simplest form, you define a Python function to execute your task and use Thread to start it. Control returns back to your main application while the thread runs. You can monitor the runnin...
by bgreat
Tue Feb 05, 2013 4:43 pm
Forum: Python
Topic: classes
Replies: 9
Views: 1213

Re: classes

The double underscore '__init__' is a special function for a defined class. It is the default initialization (similar concept to a C++ constructor). If you do not name your initialization routine with correct name of '__init__', then your initialization is not called. You can learn more at Python Da...
by bgreat
Tue Feb 05, 2013 3:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI slave devices
Replies: 6
Views: 4315

Re: SPI slave devices

I have had great success using SPI on the Pi via C/C++ and Python with Raspberry Pi spidev interface. Also, the SPI interface synchronous clock interface can be more reliable at higher speeds. The GPIO's can be used as direct chip selects via your own code. The only issue would be that you need to a...
by bgreat
Tue Feb 05, 2013 2:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 74HC595 EMC(EMV) problems
Replies: 20
Views: 6619

Re: 74HC595 EMC(EMV) problems

Not knowing your circuit, I have a simple question. What is the connection to /MR? My first thought reading your problem description is that the reset is seeing a pulse due to EMI. I would recommend a strong pullup to Vcc.

Enjoy!
Bill
by bgreat
Tue Feb 05, 2013 2:33 pm
Forum: General discussion
Topic: Advice: 3x3x3 LED Cube for RPi School Club
Replies: 7
Views: 3522

Re: Advice: 3x3x3 LED Cube for RPi School Club

If you are not interested in individually dimmable LED modes, I would look at the AS1107 SPI 8x8 LED matrix driver chip. The SPI interface will make this simple to interface with the Raspberry Pi while still leaving the GPIO pins available. You could start with a 3x3 cube and expand to a 4x4x4 witho...
by bgreat
Tue Feb 05, 2013 12:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI slave devices
Replies: 6
Views: 4315

Re: SPI slave devices

Using a demultiplexer chip (74HC138 or '139 or '154), it is a simple task to add additional SPI chip selects. To maintain the SPI CE timing, you connect your GPIO lines to the address inputs, the SPI CEx line to an input, and use the outputs as your new SPI select lines. 1 '139 plus 2 GPIO, 2 SPI CE...
by bgreat
Mon Feb 04, 2013 6:58 pm
Forum: Bare metal, Assembly language
Topic: Standard connector
Replies: 3
Views: 1331

Re: Standard connector

The problem with the 26-pin header to DB-25 cable is that pin 26 of the GPIO is not available on the DB-25. If you do not mind losing one GPIO, this is a solution. The cable is was once sold as a PC motherboard to parallel port cable. I have several of these myself. The 26-pin header and mates are s...
by bgreat
Mon Feb 04, 2013 3:20 pm
Forum: Python
Topic: Newline character appearing in txt file of paths
Replies: 2
Views: 703

Re: Newline character appearing in txt file of paths

Try: remote_paths_list.append(_norm_line.strip()) From built-in documentation: Help on built-in function strip: strip(...) S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars inst...
by bgreat
Sun Feb 03, 2013 2:09 pm
Forum: General programming discussion
Topic: Motd issue
Replies: 1
Views: 559

Re: Motd issue

Instead of: df -Pk | grep -E '^/' | awk '{ print $4 }' | awk -F '.' '{ print $1 }' Try: df -Pk / | tail -1 | awk '{print $4}' This limits the initial report to just the '/' file system, takes the last line of the output (removing the header), then prints the fourth value. You can test the commands f...
by bgreat
Sun Feb 03, 2013 6:08 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO 28,29,30,31 functions
Replies: 4
Views: 1866

Re: GPIO 28,29,30,31 functions

From the Raspberry Pi Broadcom BCM2835 ARM Peripherals manual, Page 102:
AltPiPins.png
Alternate GPIO Pin functions
AltPiPins.png (46.49 KiB) Viewed 1836 times
You can download the full PDF file from BCM2835 ARM Peripherals - Raspberry Pi

Enjoy!
Bill
by bgreat
Sun Feb 03, 2013 5:53 am
Forum: C/C++
Topic: Setting alternate function for GPIO pins
Replies: 7
Views: 4417

Re: Setting alternate function for GPIO pins

You need to remove the I2C interface from the driver module blacklist, then reboot your Raspberry Pi. Edit /etc/modprobe.d/raspi-blacklsit.conf: # blacklist spi and i2c by default (many users don't need them) blacklist spi-bcm2708 blacklist i2c-bcm2708 Add a '#' as the first character on the "blackl...
by bgreat
Sat Feb 02, 2013 12:40 pm
Forum: Networking and servers
Topic: Emailing myself my Pi's external IP address
Replies: 3
Views: 2169

Re: Emailing myself my Pi's external IP address

Make certain you enter the command correctly. The answer given is an example of command output substitution within the bash (and similar) shell. From original answer: _IP=`wget -q -O - http://icanhazip.com/ | tail` Note: that those are back-tick characters surrounding the command and not single quot...
by bgreat
Sat Feb 02, 2013 2:14 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Interfacing with Python
Replies: 5
Views: 2580

Re: SPI Interfacing with Python

OK. I did some testing with my Gertboard DAC and ADC interfaces. I ran a test application for 28 hours and over 9,000,000 SPI transactions with no errors or issues. I monitored the memory use and system logs. There was no negative impact to the system performance and no change in the application mem...
by bgreat
Thu Jan 31, 2013 7:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Interfacing with Python
Replies: 5
Views: 2580

Re: SPI Interfacing with Python

Interesting that you have had issues with spidev. I ran a test application for 72 hours with no issues to an SPI display. Maybe this weekend I'll try running a continuous read and write to the Gertboard DAC and ADC as a test. I have a strange attraction to stability related issues. :o I just can not...
by bgreat
Wed Jan 30, 2013 6:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI Interfacing with Python
Replies: 5
Views: 2580

Re: SPI Interfacing with Python

You can read Nokia Pi LCD for some information on using SPI from Python. I updated the original software SPI interface to use SPI communication via the spidev hardware interface. And this could be a starting point for you for the MCP3008: Raspberry Pi spidev Communication with MCP3002 . It uses the ...
by bgreat
Wed Jan 30, 2013 1:39 pm
Forum: General discussion
Topic: Reading Voltages
Replies: 4
Views: 2117

Re: Reading Voltages

Here is a reference with some material on measuring negative voltages with an ADC.

How do I measure a negative voltage with a ADC?

Enjoy!
Bill

Go to advanced search