Quantcast
Channel: Recent Discussions — Parallax Forums
Viewing all 18783 articles
Browse latest View live

LM34 Temperature Sensor

$
0
0
I purchased several LM34 temperature sensors to use with my high school engineering classes. The LM34 has a great reputation for accurate temperature measurement (+/- 0.5 degree F) and provides a voltage signal that is a linear function of the Fahrenheit temperature (10mV per degree F, 0 v = 0 degrees F). My LM34 sensors seem to read about 5 degrees F (50 mV) higher than a thermometer placed next to the breadboard. I have tested the reference voltage to the LM34 and found it to be 4.96-4.97 v. Can anyone suggest what the problem might be? Many thanks as always for your incredible support!

SimpleIDE and Propware -- I'm missing something.

$
0
0
I am running Win10. I am trying to use PropWare with SimpleIDE. I have downloaded the latest version of both. I got as far as attempting to run the cogc example. I set up the project the same way as I did for the getting started project. Didn't work. It failed because the '_load_start_blinky_cog' was missing. I know SIMPLEIDE will create this from a COGC file. So....

I included the blinky.cogcpp file in the project and received the message that the file format was wrong. I deleted it from the project file, changed he extension to .cogc and added it to the project. Failed again, this time because it couldn't fine the pin.h include file.

So...what am I missing.

A Propeller by any other name...

$
0
0
In hopes of consolidating the naming/terminology discussion to a dedicated thread, I've started this one. Maybe some moderators could move some of that chatter over here. In the meantime, here are my own thoughts on naming:

Propeller / Cog

I've always thought that the use of "propeller" and "cog" together didn't make any sense. It feels like a mixed metaphor. Additionally, "propeller" is a mouth-full. So, one ends up saying "prop", which just doesn't do the chip justice. And I agree that "cog" stands out, compared to "core". Here's one suggestion: rename "Propeller" to "Cognition" and keep "cog". "In this case, "Cognition" is a catch-all for the overall style of chip (what we general attribute to the "propeller design philosophy"). For versioning purposes, prefix a model name/number. For instance the "Neo Cognition Chip". Then we can informally refer to the chip by the prefix (e.g. "I'm using the Neo to [insert awesome thing here]."). In this case, the "Neo" would be a particular variant of the Cognition chip (based on the P1+), which would allow for revisions (Neo2, Neo3, etc.). When the P2/P3 is finally released, it would get a new prefix.


Memory / Registers

Following on [post=1258343]Cluso's post[/post], I'd just go with "Private Memory" and "Shared Memory" (less verbose).

Why Are Too Few Females in Robotics? Could It Be the Robots?

Need advice parts/sensor advice would like to rebuild my stingray robot.

$
0
0
So this is "frankBot" As it has sat for quite a long while. Basically two years since I had my daughter.

https://www.youtube.com/watch?v=tcex8l1Gwxc

Right now it is just a stingray chassis with the original motors and wheels. It uses two 8 cell NiMh battery packs along with custom buck conversion. It has a few sonars and BlueTooth which link to an Arduino and pass info on via SPI to a prop which control the motors and handles the home made encoders. There is a second Arduino which monitors battery's and can switch packs on and off, monitor charging etc, this Arduino handles the LCD too.

Originally I thought I would use a bunch of ATMega328s, with a UNO boot loader in order to easily allow for a lot of sensors to be connected and and send there data to a prop using SPI this way I was not wasting prop pins on things which don't require a ton of speed.

I think the way I originally made this robot was just a bad architecture and I was using the propeller in the wrong way. What I would like to do now is use two propeller chip to connect to most of the sensors on the bot. For motor and battery control I want to use a Cypress PSOC 5, I mean I can drag and drop hardware based quadrature decoders, and all kinds of analog components. Basically I see the PSOC 5 as a way to build something like the Polulu motion controllers with PID adjustment, it just has a lot more power and can fit a lot more motor control routines in it than the Polulu boards! I can also use the PSOC to help filter and merge data from the encoders/compass/accelerator for dead reckoning. And finally I want to use a parallella as the major brain to handle more complex sensors and crunch algorithms fast, and do things like text to speech and other misc things that require 50 dollar modules.

The first time I built this robot I wanted to build all the hardware by hand, this time I more interested in getting the hardware up and doing its thing as fast as I can, there is no reason to make any custom PCB's or veri-board anything unless I have to, or its a whole lot more cost effective to DIY.

So here is the run down Parallela main brain, PSOC5 for motor control and pid along with some/all dead wrecking math built in to motor control functions. Two propellers to connect all the sensors and controls together and then send the info to PSOC or Parallela depending on where it needs to go. What I want to do is primary autonomys navigation along with life detection (probably use a grid eye for that. or openCV). I plan to do 2D slam using, and save the data to SD so the bot can recognize where it is.

Anyways I need some help with part selection... First off im looking for the best sensors to help make point clouds for the 2d slam. I know I will be using sonar, but I also want to use laser. The problem is price, all the decent laser scanners I know of that can do 360 degree turret are out of my price range have not seen one under 500 bucks. I know that parallax is selling a 300 dollar laser module and and there is also the new lidar light. The problem is these are still KIND of pricey and they arent scanning. I am not sure how suitable they would be to slap on top of a motor with encoder and do scans, I would like to be able to do a at least 180 degrees per second. There is also the option of using a red laser with a WiiMote Pixart cam sensor, I will have to figure out how the cam was used to make a laser range finder for the Lassiter bot another member made. This is also not a great solution considering only official wee cams work and the wee is getting old. I know you can buy replacement laser modules for the Neato vacum bots, this would work really well but im not sure how easy they are to play with. Finally the Kinnect, this route requires the use of a laptop or full on mini itx PC on board though, although the Kinnect can easily do way MORE than a 2D point could I don't want to add a PC on board just to use a kinnect. So if anyone has any ideas for any other sensors I can use to average with sonar and IR sensors to make an accurate point could I am all ears!!

Secondly last time I made my own quad encoders out of IR and PCB with wedge designs glued to them attached to the stingray motors back shaft. I would like to find motors that can still go reasonably fast but have better gearing and maybe quad encoders built in, or at least a back shaft and a set of quad encoders I know will just be plug and play with the motors! I dont even know how to figure out what kind of motors are size compatible with the stingray kit.

Lastly Battery system!! Currently I am using two diy packs made from 8 1.2v 2500mah NiMh cells. One was for the motors only and the other was probably overkill for the logic, I never PWMed the motors of 7.2v and I used custom made buck converters for the electronics power rails the way I could get HOURS and HOURS of life out of the pack running the electronics. Problem is the logic pack time to Motor pack time is pretty ridiculous... Secondly I cant get the packs to charge all the way back up to there 11.2 volts, I am lucky to get 10 on either of them. I think Sealed lead acid may be a better way to go with a whole lot less fuss but these will be kind of heavy. I don't know if I really want to use lithium because I will have to invest in a new charger and I just don't trust lithium, I have them blow up on me a few times.

Sorry about long post but if anyone has some advice id appreciate it! The last two years I have basically been involved in analog land learning all I can mostly doing RF and in the middle of a Kick Starter team for Audio products. This stuff has all been educational and a bit fun but I am getting the itch to code again and intergrate all my new analog knowledge in to my digital projects!

Propeller C language: Why rc_time max = 249,987?

$
0
0
When I max out time on a Propeller C language rc_time() I get a return of 249987. Why that number? I don't think it is max size for int from C spec: ...Capable of containing at least the [−32767, +32767] range...

In BS2 PBASIC, an RCTIME return that is outside of bounds is 1 (too short) or 0 (too long), which is very convenient.

Thanks.

Next large robot

$
0
0
I've started the design work on my next creation which will be a bit different than the last few I've built. This robot will be a Hexapod based on a circular body. Each leg will have 3 drive motors and will use a design similar to the old Odex I (look it up if the name isn't familiar!). All moving parts will be on bearings or bushings, there will be 24 per leg. Linear actuators drive two axis and the third uses a large gear motor.

I built a wooden version of one leg to validate the design,clearances and interferences. The CAD drawings were finished last night so the next step is cutting out the aluminum stock. Then it all goes into a CNC mill to make the parts!

I'm using Parallax parts as much as possible but some things like the linear actuators were ordered elsewhere. The HB-25 motor controllersl are used to drive the 12 volt motors and 6 custom propellor boards will be used to control the legs. These controllers will be networked together with a master prop board running the show. The goal is to get the mechanical parts for a single leg together before the end of the year and have the basic individual leg programming completed before spring. I expect the final weight of the robot to be around 125 pounds and it will stand up to a maximum of around 4.5 ft.

The rest of the legs will follow shortly after that (nice thing about a CNC is that design changes are easy to incorporate and reproduce!). I plan on using Rodney Brooks's behavioral programming ideas for this robot. So I have a lot of studying to do. My big goal is for it to be able to climb stairs with a minimum of input from myself. If I can do that, then it will be a success for me!

This is actually my second Hexapod using this basic design but with access to better machining (CNC) capabilities and more modern electronics I expect to have more success this time around (the original was built in the 80's and had very limited capabilities)

I'll add photos as I go along if anyone is interested.

Bob

Nice $35 Android Tablet

$
0
0
http://www.walmart.com/ip/45804399

I've bought several Android tablets lately and this one's my favorite. Fast Android 5.0, nice clear screen, good sound, good wifi range, decent battery life, does everything well so far. I must admit, I had very low expectations of RCA slapping their name on somebody else's tablet but all that's behind me. I went to order a second one today and the price dropped $5 since I bought. Prolly because the only colors left are blue and purple, but I wanted another blue one anyway. Booya and erco-approved!

Have it shipped free to a WM near you for pickup and try it out for 15 days.

Edit: That's an 8GB unit, here's the same one with 16GB for $40, available in black and purple: http://www.walmart.com/ip/RCA-7-Tablet-16GB-Quad-Core/45804400

Lisp scripting for C

$
0
0
On another thread we were discussing scripting languages that could be hooked up to C, and I suggested my Tinyscript language, which is a very simple scripting language parsed directly out of the string provided. Tinyscript is very simple and has a nice (I think) syntax, but it does have a number of limitations, including no user defined functions, no string datatype, no arrays, and subroutines cannot have parameters.

So I've written another scripting language: Proplisp. (I hope the name isn't taken!). As you can guess, it's based on Lisp. It's a very simple, cut down version of Lisp, but it is certainly Turing complete. Unlike Tinyscript you can define functions: in fact you can define anonymous functions, and functions are first class objects. The C interface is similar to Tinyscript's, and the code footprint is about the same. I had hoped to make it smaller, but although the parser is much simpler than Tinyscript's the garbage collector and more complicated eval pretty much canceled that out. As with Tinyscript the data footprint is strictly bounded; Proplisp only uses the block of RAM you give it at startup. It does need more stack than Tinyscript, and it can use up the provided RAM pretty fast, although the garbage collector helps (Tinyscript has no dynamic allocation so it doesn't need GC).

The code is primarily intended as an embedded scripting language for other C applications, but I did write a simple test framework with a read-eval-print loop.

I've uploaded the binary for those who want to play with Lisp on the Propeller, but since there's no way to load/save it's not really very practical. It would be great if someone could do a proper editor and/or interface with the SD card (the SD reader on my C3 board doesn't work, so I can't really try this; I guess saving to EEPROM might also be feasible, does anyone have code to do that?)

Eric

Propeller II: Emulation of the P2 on FPGA boards (Prop123-A7/A9, DE0-NANO, DE2-115, etc)

$
0
0
======================================================================
This is the new P2 info (26 September 2015 onwards) after the P2-Hot...
(for prior discussions, and the old P2-Hot & prior info, see the sections further below)
======================================================================
Info in this thread begins from this posting onwards...
http://forums.parallax.com/discussion/comment/1347832/#Comment_1347832


P2 FPGA release (26 Sept 2015)
http://forums.parallax.com/discussion/162298/prop2-fpga-files/p1

P2 Documentation thread
http://forums.parallax.com/discussion/162409/p2-2015-assembly-instruction-set-document-plus-bugs-section#latest
P2 Addressing and Labelling Syntax (summary thread)
http://forums.parallax.com/discussion/162483/addressing-and-labeling-syntax

Latest DE2-115 loading instructions
http://forums.parallax.com/discussion/comment/1347927/#Comment_1347927

New FPGA Boards supporting the P2 FPGA Emulation
* Propeller 1-2-3 FPGA Board (#60054) "A7"
http://forums.parallax.com/discussion/161545/propeller-1-2-3-fpga-board-60054-available-to-forum-members-375/p1

Please note you will require Quartus II v15 for the Cyclone V based boards.



======================================================================
Below is some info after the P2-HOT, but prior to the 26-Sep-2015 FPGA code release
======================================================================

There has been a lot of discussion following the P2-HOT. Not much of it is referenced here as it was largely in a state of flux.

Chip has released the binary for:
- a 1 cog Propeller II emulation (with restrictions) that runs on a Terasic DE0-NANO FPGA board.
- a 5 cog Propeller II emulation (with restrictions) that runs on a Terasic DE2-115 FPGA board.

19 April 2014:
About a month ago, the P2 hit a considerable snag with power being way too high.

New Proposed Specs
(from my recollection)
* 512KB Hub Ram, 128-bit quad access
* 2KB Cog Ram, 128-bit quad access
* 16 Cogs, 2 clock instructions @ 200MHz = 100 MIPs
* Hubexec support (details still being decided)
* Some form of Smart I/O.

There has been quite a lot of discussion (about the changes) here
http://forums.parallax.com/showthread.php/155132-The-New-16-Cog-512KB-64-analog-I-O-Propeller-Chip
The current proposed P2 (sometimes called P1+ or P16+) Proposed Instruction Set is here
http://forums.parallax.com/showthread.php/155132-The-New-16-Cog-512KB-64-analog-I-O-Propeller-Chip?p=1260747&viewfull=1#post1260747
My instruction summary is here
http://forums.parallax.com/showthread.php/155132-The-New-16-Cog-512KB-64-analog-I-O-Propeller-Chip?p=1260872&viewfull=1#post1260872
Chip posted an ALU Timing Diagram
http://forums.parallax.com/showthread.php/155132-The-New-16-Cog-512KB-64-analog-I-O-Propeller-Chip?p=1261426&viewfull=1#post1261426

Prior to this snag, there were two P2 FPGA code postings. These were interim released without full documentation.
Dates 19 Mar and 24 Mar 2014. If you really want to try them, please search the P2 forums.


======================================================================
Below is all the previous info for the older releases up to and including the P2-HOT
======================================================================


The following is now out of date...
Propeller Overview

The Propeller II is a new 8 core 32bit RISC microcontroller to be released shortly by Parallax http://www.parallaxsemiconductor.com/
This follows on from the current 8 core P8X32A propeller microcontroller.
The propeller chips utilise soft (intelligent) peripherals, so that the one chip can have many different peripherals that can even be dynamically changed on the fly. The propeller utilises a large SRAM rather than FLASH making software changes on the fly a reality.

Way to go Chip & Parallax!

This thread is for discussions specific to the P2 emulations on these FPGA boards (Altera Cyclone IV FPGAs).

I try to keep this post updated with the latest information and links, so please let me know if something needs updating here.



Update 28 Jan 2014:
The latest code (FPGA, pnut.exe, sample programs, documents) are all in one zip with info on this post
http://forums.parallax.com/showthread.php/153422-HUB-EXEC-Update-Here?p=1237960&viewfull=1#post1237960
Beware the instruction set has major changes - even better than the last impressive changes - Fantastic work Chip!

Update 26 Nov 2013:
The latest code (FPGA, pnut.exe, sample programs, documents) are all in one zip with info on this post
http://forums.parallax.com/showthread.php/151904-The-Big-Update-is-done!!!?p=1221918&viewfull=1#post1221918
Beware the instruction set has changed - really impressive changes - Congratulations Chip!

Update 1 Oct 2013:
The latest code (FPGA, pnut.exe, documents) are all in one zip with info on this post
http://forums.parallax.com/showthread.php/150588-Big-update-for-DE2-115-and-DE0-Nano-users-w-add-on-boards?p=1210517&viewfull=1#post1210517
The Monitor Entry point now seems to be $700 (was$70C) - thanks ozpropdev
Warning for DE0 Users:
This code only works using the Parallax expansion board.
A shunt/jumper on JP3 pins 3 to 5 on the DE0 board.
The SPI Flash must be removed from the socket on the expansion board.



Downloads...
DE0-NANO & DE2-115 & PNUT.EXE:
The latest (as of 5 Dec 2012) download from Chip for both FPGA boards and pnut.exe is updated in this post (#106)...
http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1146196&viewfull=1#post1146196
The latest reference is from post (#193)...
http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1147388&viewfull=1#post1147388
2013/1/10: Latest DE2 emulation with onboard SD pins connected (see this post and the following 2)
http://forums.parallax.com/showthread.php/144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards?p=1156757&viewfull=1#post1156757
A new FPGA download (10 Apr 2013) for both the DE0 & DE2 for accessing the SDRAM is here (the DE2 is a few posts earlier), together with P2 PASM example code for the SDRAM..
http://forums.parallax.com/showthread.php/147301-SDRAM-Driver?p=1176286&viewfull=1#post1176286


DE0-NANO:
(see post #2)

DE2-115:
(see post #5)

Getting started on your DE0-NANO / DE2-115 board...
Both downloads include an example spin program. This has setup instructions for the FPGA boards at the top of the file.

Edit & Compile...
Both downloads contain the PNUT.exe which is similar to the PropTool - it has an editor and P2 compiler.

P2 Instruction Set & P2 Details (preliminary)...
The latest instruction set details from Chip are available throughout this thread and then following on in this thread (from 9 December 2012) "The unofficial P2 documentation project". Peter Jakaki and Seairth (and others) have converted this information to google docs, including nice formatting and a web-page version...
The web-page version of the document is viewable without any signing in required
If you want to contribute then go to the Google document and request sharing.
I have an Excel Spreadsheet summary of the P2 instruction set. For now, scan from the end of the thread backwards for the latest post (it is a zip file due to forum restrictions).

P2 Monitor Rom...
Doug (potatohead) has documented using the Monitor ROM present in the P2...
http://forums.parallax.com/entry.php/1446-Using-The-P2-Monitor-Document-Complete-(for-now)

P2loader by David Betz
This is a Propeller II binary downloader and is available here...
http://forums.parallax.com/showthread.php?144384-p2load-A-Loader-for-the-Propeller-II

P2 PropTerminal by Andy
Andy has a P2 version of his PropTerminal program available here...
http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1150859&viewfull=1#post1150859

PFTH (P2 FORTH) by Dave Hein
Dave Hein has ported PFTH 1.03 (Prop FORTH) to run on the P2. It has been tested on the DE2-115 but not the DE0-nano yet. It is available here...
http://forums.parallax.com/showthread.php/144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards?p=1239915&viewfull=1#post1239915


Altera Quartus FPGA Software
Only the downloader is required.
https://www.altera.com/download/software/prog-software
Here is a later discussion and drivers about this
http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1148613&viewfull=1#post1148613
Here is some more info and drivers (thanks D.P.)...
http://forums.parallax.com/showthread.php?144643-Propeller-II-emulation-for-Idiots&p=1150972&viewfull=1#post1150972



Update 21Dec2012:
My DE0-Nano has arrived...
I downloaded the Quartus II Stand-Alone Programmer (Windows exe 128MB = 12.1_177_program_windows.exe and is !142MB).
Next I plugged in the DE0-NANO (via the miniUSB port). Windows could not locate a driver.
I downloaded the Driver.rar (see D.P.'s thread above for this) and unzipped it.
Next I opened Start/Control Panel/USB_Blaster/Hardware/Properties/Update Driver (hope I wrote this down correctly after a few attempts)
and Browsed to the unzipped Driver folder and clicked on something like manually look in this folder and sub-folders. The driver was located and installed.
Download the Emulator & Pnut.exe and view the pictures (.png files) in the download for the setup.
Start the Quartus II Standalone Programmer
* Click the Hardware Setup, and select the USB-Blaster (USB-0)
* Click File/Open and locate and select the downloaded DE0_Nano_Prop2.jic file
* Click on the Program/Configure and the Verify boxes for this file (note the Program/Config also selects for the default image too).
* Click Start and your FPGA will be programmed/verified with the P2 emulation. Check the progress bar to ensure success.
* Close Quartus II program.
* Disconnect power to the DE0 and the USB connection.
* Connect your PropPlug to the DE0 (or expansion board if using this).
* Re-apply power.
* Launch PST and hit <space> and you should see the Propeller II Monitor prompt returned.

You can also find info in Doug's (potatohead) P2 Monitor document located here
http://forums.parallax.com/showthread.php?144643-Propeller-II-emulation-for-Idiots&p=1150974&viewfull=1#post1150974


Some suggestions...
  • No doubt there will be a lot of suggestions for changes to the emulation.
    • Suggest by all means to reach a consensus, but don't interrupt Chip from his work in getting the P2 documented and out.
  • Post your test programs here by all means
  • Please keep this thread for discussions on the DE0-NANO and DE2-115 and the P2 emulation
  • There is also some discussion about the instructions and how they execute
  • There is some preliminary info on P2 pcbs too
Add-on boards for DE0 & DE2...
Update 14 Mar 2013:
These pcbs are now available. Here is the thread where they are being discussed...
http://forums.parallax.com/showthread.php/146197-DE0-Nano-and-DE2-115-add-on-boards-for-Prop2-emulation-are-ready!

Here is the original thread about the P2. The emulation discussion starts around page 40.
http://forums.parallax.com/showthread.php?125543-Propeller-II-update-BLOG/page44

The Emulation Boards...

DE0-Nano Development and Education Board
by Terasic
WARNING: There are two DE0 FPGA boards. The IS the one you want.
It has a Cyclone® IV EP4CE22F17C6N FPGA
http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=593&PartNo=1
Cost US$79 or US$59 academic
Digikey and Element14 both carry these boards

Altera DE2-115 Development and Education Board by Terasic
http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=502
Cost US$595 or US$299 academic

SX48BD-G Development

$
0
0
Can anyone list dev boards, programmers, and other tools that are still available for prototyping with this baby? I'm not familar with SX micros but have applications where I think I can possibly use the SX48. (These would be low-volume projects, and since there are quite a few SX48BD-Gs still around, the EOL shouldn't be an issue.)

P1V on ProASIC3 FPGA

$
0
0
I gave a try to synthesize P1V on the A3PN250 FPGA with the free Libero SOC Software.

It looks like it would fit:
5833 out 6144 Versatiles used

The A3PN250 FPGA is interesting because it is only about 15$ per chip and it is a flash based FPGA so no external EEPROM would be needed to hold the FPGA bitstream. The chip is available in the VQ100 package.

I made a small board with the 48 pin A3PN010 chip last year. The only components on the board are the FPGA, Oscillator, regulator and some caps.
See picture :
https://onedrive.live.com/redir?resid=6FEA7F473FE5882!8406&authkey=!ADgYwZ4jDc-3uOw&v=3&ithint=photo%2cjpg

Perhaps this could be interesting for some people who would like to make an affordable P1V FPGA Board.


Terminal Text Editor on the Propeller in C/C++

$
0
0
I believe a few languages on the Propeller have text editors available, but C/C++ is not one of them. It's something I've wanted to do for quite some time but never bothered researching enough to figure it out for myself.

The time has come; I'm going to give it a shot.

I don't really know where to start, but I think the two largest problems will be memory usage and character insertion delays.

I've found a potentially helpful article here: http://electronics.stackexchange.com/questions/53823/text-editing-memory-management. It mentions an external memory module, but I'd love to see an implementation that can be run on the Quickstart - without SD card or SRAM - so I'll be creating this with the goal of a configurable editor, capable of running on a Quickstart as well as utilizing larger amounts of memory when possible.

Any suggestions are more than welcome! Pointers to existing text editors on a microcontroller would be much appreciated as well.

I will likely track progress for this on this GitHub issue for PropWare. A link to the git branch will be provided when the first commit has been made.

Half-duplex synchronous serial tested.

$
0
0
Here's a quick little demo of the synchronous TX and RX communicating with the DS1620. (sorry, no exciting pictures.) For those not familiar with the DS1620, here are the key points:

* Synchronous serial (up to about 1.75MHz)
* Half-duplex (single DQ line)
* For read operations, send 8-bit command on DQ, then receive 9-bit response on DQ
* For write operations, send 8-bit commnad on DQ, then send 9-bit value on DQ
* For non-parameter operations, just send 8-bit command on DQ
* /RST line is pulled high to execute a single command, then pulled low.

In the attached code:
* /RST is implemented using good old SETB/CLRB on OUTA.
* CLK is implemented using the "transition" smart cell mode.
* DQ is implemented using a single smart cell that is switched back and forth between synchronous transmit and receive

Two quick notes:

1. A logic analyzer helps! (I used SPLAT. Thanks, Peter!) It turns out that the the timing of the DQ line relative to the CLK line was different than what I was expecting. In the end, I followed the timing used by the DS1620 SPIN code (in the OBEX) instead of the DS1620's datasheet timing diagram(s). Remember that the first bit of the TX buffer is already on the pin before you even start clocking, so depending on how you have your clock configured, you can accidentally clock out the next bit before the other end has even registered the first bit!

2. On the RX modes, don't forget to set Output Enable OFF (field %D = 0 in PINSETM mode configuration). I wasted a LOT of time on this one, as I was expecting the read modes to implicitly do this. (@cgracey: maybe consider switching the synchronous (and asynchronous?) modes to be a single 5-bit opcode, then use the %D field to distinguish between TX and RX.)

(Note: while I was testing this with v7z, this should still work with any version that uses the new PINSETM mode layout.)

Ubuntu: PNUt & Wine works fine! (only a com1 link is required)

$
0
0
I wanted to move some Prop2 software development to my main workstation, which runs Ubuntu 12.04 64bit (the "Long Term Support" version)

PNut appeared to run fine under Wine, but it could not find the PropPlug, which was at /dev/ttyUSB0

The (easy) answer was to map /dev/ttyUSB0 to COM1 for Wine, which you can do from a terminal by executing the following line:
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1


For a nice simple terminal program just use GtkTerm, which you can install from the Ubuntu software center. Just remember to close it before programming the P2 emulator.

Note:

Your PropPlug may show up on a different /dev/ttyUSBn

Scribbler 2 Availablity

Nikos' Fibonacci Spiral Challenge

$
0
0
attachment.php?attachmentid=114080&d=1430914782

This post - http://forums.parallax.com/showthread.php/154274-The-quot-Artist-quot-robot?p=1328384&viewfull=1#post1328384 on this thread http://forums.parallax.com/showthread.php/154274-The-quot-Artist-quot-robot has prompted the beginning of a new thread so as not hijack all the great documentation about Nikos' Artist Robot.

So, we challenge everyone and especially those who made submissions to the erco figure eight challenge to make a photo or video of your favorite artistic robot drawing a spiral pattern. Per Nikos' intent and erco's question - this can be any sort of spiral - see original thread.

Post away! When I can, I will post a video of the S2 completing the challenge. Till then, here are my still photos! Also attached is Spin for the S2.

attachment.php?attachmentid=114077&d=1430914486

attachment.php?attachmentid=114078&d=1430914486

attachment.php?attachmentid=114076&d=1430914486

Storing value from Keypad

$
0
0
Hello all,

I am trying to use the keypad membrane to change a temperature ('Setpoint') which would be a 3 digit number. I am unsure how to do this, it would be a matter of displaying what ever the user inputs on the keypad onto the LCD and once they press the new temperature in, to use the value as the new temperature ('Setpoint'). All help is welcomed!

Here is what I have so far

' {$STAMP BS2}
' {$PBASIC 2.5}


' -----[ Title ]-----------------------------------------------------------
' Process Control - IncubatorOnOff.bs2

' -----[ Declarations ]----------------------------------------------------
ADC_ByteValue VAR Byte ' Analog to Digital Converter data
V_Offset VAR Word ' Temperature/voltage for ADC offset
V_Span VAR Word ' Temperature/voltage for ADC Span
TempF VAR Word ' Calculated temperature in hundredths
SetPoint VAR Word ' Heater control setpoint
ADC_CS PIN 13 ' ADC Chip Select pin
ADC_Clk PIN 14 ' ADC Clock pin
ADC_Dout PIN 15 ' ADC Data output
ADC_VRef PIN 10 ' Filtered PWM for ADC Vref

ADC_Vminus PIN 11 ' Filtered PWM for ADC Vminus
Heater PIN 8 ' Incubator heater
Fan PIN 12 ' Incubator cooling fan

row         VAR  Nib                        ' Variable space for row counting
column      VAR  Nib                        ' Variable space for column counting
keypad      VAR  Word                       ' Variable space to store keypad output
keypadOld   VAR  Word                       ' Variable space to store old keypad output
temp        VAR  Nib                        ' Variable space for polling column states

' -----[ Initialization ]--------------------------------------------------
LOW Heater ' Ensure heater off
LOW Fan ' Ensure fan off
PAUSE 1000 ' Allow connection to stabilize with StampPlot
SEROUT 9, 84,[22, 17]
'GOSUB ReadSP_Span ' Read StampPlot for ADC
SetPoint = 10100
V_Offset = 70
V_Span = 50

' -----[ Main Routine ]----------------------------------------------------
DO
' GOSUB ReadSP_Controls
GOSUB DriveFan
GOSUB DisplayLCD
GOSUB UserInput
GOSUB SetADC
GOSUB ReadADC
GOSUB CalcTemp
GOSUB Drive_Heater
PAUSE 500
LOOP

' -----[ Subroutines ]-----------------------------------------------------

ReadSP_Span: ' On connection, get ADC range
DEBUG CR,"!READ (txtTMin)",CR ' Request/store offset
DEBUGIN DEC V_Offset
PAUSE 50
DEBUG "!READ [(txtTMax),-,(txtTMin)]",CR ' Request/store Span (Max-Min)
DEBUGIN DEC V_Span
PAUSE 50
RETURN

ReadSP_Controls:
DEBUG "!READ [(txtSetPoint),*,100]",CR ' Obtain setpoint in hundredths
DEBUGIN DEC SetPoint
PAUSE 50
DEBUG "!READ (swFan)",CR ' Request/control Fan state
DEBUGIN Fan
PAUSE 50
RETURN

SetADC:
PWM ADC_Vminus, V_Offset * 255/500,100 ' Set Voltage for ADC Vminus
PWM ADC_Vref, V_Span * 255/500,100 ' Set voltage for ADC Vref
RETURN

ReadADC: ' Read ADC 0831
LOW ADC_CS ' Enable chip
SHIFTIN ADC_Dout, ADC_Clk, MSBPOST,[ADC_ByteValue\9] ' Clock in ADC data

HIGH ADC_CS ' Disable ADC
RETURN

CalcTemp: ' Transfer function for temperature in hundreths
TempF = (V_Span * 100)/255 * ADC_ByteValue + (V_Offset * 100)
RETURN
Drive_Heater:
IF TempF > SetPoint THEN ' Determine heater state
LOW Heater ' Above setpoint - Heat off
ELSE
HIGH Heater ' Below setpoint - Heat on
ENDIF
RETURN


DriveFan:
IF TempF > (SetPoint + 300) THEN
  HIGH Fan
ELSE
  LOW Fan
ENDIF
RETURN

DisplayLCD:
SEROUT 9, 84, [128,"Set Point:", 138, DEC5 SetPoint, 148,"Temp:",154, DEC5 TempF]
RETURN


' -----[ Subroutine - ReadKeypad ]-------------------------------------------------
' Read keypad button states
ReadKeypad:
  keypad = 0
  OUTL   = %00000000                        ' Initialize IO
  DIRL   = %00000000

  FOR row = 0 TO 3
    DIRB = %1111                            ' Set columns (P7-P4) as outputs
    OUTB = %0000                            ' Pull columns low (act as pull down)
    OUTA = 1 << Row                         ' Set rows high one by one
    DIRA = 1 << Row

    temp = 0                                ' Reset temp variable to 0
    FOR column = 0 TO 3
      INPUT (column + 4)                    ' Set columns as inputs one by one
      temp = temp | (INB & (1 << column))   ' Poll column state and store in temp
    NEXT

    keypad = keypad << 4 | (Temp REV 4)     ' Store keypad value
  NEXT
RETURN

UserInput:
GOSUB ReadKeypad
    IF Keypad.BIT12 THEN                    ' If "A" is pressed
    GOSUB ChangeTemp
    ENDIF
RETURN

ChangeTemp:
SEROUT 9,84,[148,"Input Temp"]

RETURN

Maker Faire UK (Sat/Sun 23/24 April)

$
0
0
Hi All

Maker Faire UK is next week (Sat/Sun 23/24 April). It's being hosted in Newcastle. More details here:

www.makerfaireuk.com

There's usually lots of cool making stuff going on and a great opportunity to chat with the makers from other hack/fab labs.


If any one does get there I'll be on the Maker Space.


cheers

W5500 PASM driver?

$
0
0
Wondering if anyone has a PASM driver for the Wiznet W5500.
Viewing all 18783 articles
Browse latest View live