Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 24
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
ramses (16)
Arcstarter (31)
Zak (15)


Next birthdays
05/12 Colin 99 (53)
05/14 hvguy (41)
05/14 thehappyelectron (14)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

Good. God.

 1 2 3 4 
Move Thread LAN_403
Bjørn
Wed Mar 14 2012, 12:16PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
I think RISC OS can map pages of other tasks to the same address to get them out of the way of the running task (all tasks think they run at the same address) but none of the versions I have will protect anything.
Back to top
Ash Small
Wed Mar 14 2012, 09:36PM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
Am I correct in assuming that, with 8 GPIO pins, I can have 256 output 'states'?
Back to top
Steve Conner
Wed Mar 14 2012, 11:09PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Yes, and you can usually also set them to be inputs, which is a third possibility.

You can also blow them with excessive voltage and then you don't have 8 any more. frown On modern hardware they may be 3.3V and not 5V tolerant.

The I2C bus can be used to add extra (slow) GPIO, using chips such as the PCF8574. This is quite old and clunky now, but newer chips may be available. I used three PCF8574s to add 24 extra outputs to my processor.
Back to top
Ash Small
Thu Mar 15 2012, 05:32PM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
Steve Conner wrote ...

Yes, and you can usually also set them to be inputs, which is a third possibility.

You can also blow them with excessive voltage and then you don't have 8 any more. frown On modern hardware they may be 3.3V and not 5V tolerant.

The I2C bus can be used to add extra (slow) GPIO, using chips such as the PCF8574. This is quite old and clunky now, but newer chips may be available. I used three PCF8574s to add 24 extra outputs to my processor.

Yes.........

I was thinking something along the lines of using the GPIO pins to 'drive' another chip, which sampled data from numerous other sources, and controlled other processes. The sampled data could then be fed back, possibly via another port?

simple, and reasonably fast, maybe?

(could presumably also be achieved using the USB ports, but that might well use up a lot more processor power?)

EDIT:

Steve Conner wrote ...

On modern hardware they may be 3.3V and not 5V tolerant.


I think I read that they connect direct to the processor, and run at 1.8v, but I'd need to re-read it to be certain.
Back to top
Bjørn
Thu Mar 15 2012, 06:19PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
With 700 000 000 instructions per second (ignoring the 24 GFLOP GPU that is harder to use) there is no need to worry about computing power, only about bad code.

You can get as many input and output lines as you want using shift registers like the 74HC595 on the SPI port, leaving the GPIO free.

The voltage levels are 3.3 V in and out.

How to access the hardware under Linux (it might even work): Link2
Back to top
Steve Conner
Thu Mar 15 2012, 06:26PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Yes, the shift register trick is commonly used, and will work if the SPI port does.

The Linux code looks quite reasonable. I guess the mmap() function with the MAP_FIXED option is what makes the MMU do your bidding.
Back to top
Conundrum
Thu Mar 15 2012, 06:34PM
Conundrum Registered Member #96 Joined: Thu Feb 09 2006, 05:37PM
Location: CI, Earth
Posts: 4059
Nice, shame they didn't put onboard serial.
At least a USB to serial IC which is standard, then us PIC/AVR folk could program them directly from the RPi.

-A
Back to top
Bjørn
Thu Mar 15 2012, 10:32PM
Bjørn Registered Member #27 Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
Yes, the shift register trick is commonly used, and will work if the SPI port does.
Even if they confused the lines to the SPI it will be possible to bitbang it at double or triple digit MHz.

That said this is a very bad choice for a microcontroller in most cases. It is a general purpose computer more powerful than the 7th PC I ever owned. It only makes sense as a microcontroller if you need to control very little that requires huge amounts of computing power and or a high resolution display.
Back to top
Steve Conner
Fri Mar 16 2012, 08:01AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Yes, it's a sexy solution looking for a problem. smile

My first experience of hardware hacking was with an Amstrad word processor. I got the joystick interface, and it came with a manual giving the IO port address if you wanted to use it in your own programs. I had great fun connecting random things to the joystick inputs and writing BASIC programs to interpret the results. My favourite was the real life Pong table using a mini hovercraft as the puck. Of course the games got a bit rowdy and it got smashed. smile

But anyway, I hope the RPi is capable of giving today's kids fun experiences like that. Formative ones too, in my case I have been making a living connecting random things to computers ever since. smile
Back to top
Ash Small
Fri Mar 16 2012, 12:00PM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
Bjørn wrote ...


That said this is a very bad choice for a microcontroller in most cases. It is a general purpose computer more powerful than the 7th PC I ever owned. It only makes sense as a microcontroller if you need to control very little that requires huge amounts of computing power and or a high resolution display.

Yep, my reasons for wanting to use it as a microcontroller are firstly, the MKS vacuum equipment I'm planning to use is/was designed to be controlled using very primitive RS232 technology, and secondly, the price (£20).

I may also use it to provide the signals for controlling the HV transformer gate drivers and magnetron drive circuits as well, presumably via buffer/slave chips.

(no huge amount of processing power required here smile )

EDIT: I've not written much code since the days of the ZX80 and Jupiter ACE, though. (except HTML)
Back to top
 1 2 3 4 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.