From: drowe67 Date: Sat, 17 May 2008 04:08:08 +0000 (+0000) Subject: accidental import X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=e4e818722d9d20df784c8123eee9574d82c34ee7;p=freetel-svn-tracking.git accidental import git-svn-id: https://svn.code.sf.net/p/freetel/code@19 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 4b992c41..00000000 --- a/LICENSE +++ /dev/null @@ -1,266 +0,0 @@ -The TAPR Open Hardware License -Version 1.0 (May 25, 2007) -Copyright 2007 TAPR – http://www.tapr.org/OHL - -PREAMBLE - -Open Hardware is a thing - a physical artifact, either electrical or -mechanical - whose design information is available to, and usable by, -the public in a way that allows anyone to make, modify, distribute, and -use that thing. In this preface, design information is called -"documentation" and things created from it are called "products." - -The TAPR Open Hardware License ("OHL") agreement provides a legal -framework for Open Hardware projects. It may be used for any kind of -product, be it a hammer or a computer motherboard, and is TAPR's -contribution to the community; anyone may use the OHL for their Open -Hardware project. - -Like the GNU General Public License, the OHL is designed to guarantee -your freedom to share and to create. It forbids anyone who receives -rights under the OHL to deny any other licensee those same rights to -copy, modify, and distribute documentation, and to make, use and -distribute products based on that documentation. - -Unlike the GPL, the OHL is not primarily a copyright license. While -copyright protects documentation from unauthorized copying, modification, -and distribution, it has little to do with your right to make, distribute, -or use a product based on that documentation. For better or worse, patents -play a significant role in those activities. Although it does not prohibit -anyone from patenting inventions embodied in an Open Hardware design, and -of course cannot prevent a third party from enforcing their patent rights, -those who benefit from an OHL design may not bring lawsuits claiming that -design infringes their patents or other intellectual property. - -The OHL addresses unique issues involved in the creation of tangible, -physical things, but does not cover software, firmware, or code loaded -into programmable devices. A copyright-oriented license such as the GPL -better suits these creations. - -How can you use the OHL, or a design based upon it? While the terms and -conditions below take precedence over this preamble, here is a summary: - -* You may modify the documentation and make products based upon it. - -* You may use products for any legal purpose without limitation. - -* You may distribute unmodified documentation, but you must include the -complete package as you received it. - -* You may distribute products you make to third parties, if you either -include the documentation on which the product is based, or make it -available without charge for at least three years to anyone who requests -it. - -* You may distribute modified documentation or products based on it, if -you: - * License your modifications under the OHL. - * Include those modifications, following the requirements stated - below. - * Attempt to send the modified documentation by email to any of the - developers who have provided their email address. This is a good - faith obligation – if the email fails, you need do nothing more - and may go on with your distribution. - -* If you create a design that you want to license under the OHL, you -should: - * Include this document in a file named LICENSE (with the appropriate - extension) that is included in the documentation package. - * If the file format allows, include a notice like “Licensed under - the TAPR Open Hardware License (www.tapr.org/OHL)” in each - documentation file. While not required, you should also include - this notice on printed circuit board artwork and the product - itself; if space is limited the notice can be shortened or - abbreviated. - * Include a copyright notice in each file and on printed circuit - board artwork. - * If you wish to be notified of modifications that others may make, - include your email address in a file named “CONTRIB.TXT” or - something similar. - -* Any time the OHL requires you to make documentation available to -others, you must include all the materials you received from the -upstream licensors. In addition, if you have modified the -documentation: - * You must identify the modifications in a text file (preferably - named "CHANGES.TXT") that you include with the documentation. - That file must also include a statement like "These modifications - are licensed under the TAPR Open Hardware License." - * You must include any new files you created, including any - manufacturing files (such as Gerber files) you create in the - course of making products. - * You must include both "before" and "after" versions of all files - you modified. - * You may include files in proprietary formats, but you must also - include open format versions (such as Gerber, ASCII, Postscript, - or PDF) if your tools can create them. - -TERMS AND CONDITIONS - -1. Introduction -1.1 This Agreement governs how you may use, copy, modify, and -distribute Documentation, and how you may make, have made, and -distribute Products based on that Documentation. As used in this -Agreement, to "distribute" Documentation means to directly or indirectly -make copies available to a third party, and to "distribute" Products -means to directly or indirectly give, loan, sell or otherwise transfer -them to a third party. - -1.2 "Documentation" includes: - (a) schematic diagrams; - (b) circuit or circuit board layouts, including Gerber and other - data files used for manufacture; - (c) mechanical drawings, including CAD, CAM, and other data files - used for manufacture; - (d) flow charts and descriptive text; and - (e) other explanatory material. -Documentation may be in any tangible or intangible form of expression, -including but not limited to computer files in open or proprietary -formats and representations on paper, film, or other media. - -1.3 "Products" include: - (a) circuit boards, mechanical assemblies, and other physical parts - and components; - (b) assembled or partially assembled units (including components - and subassemblies); and - (c) parts and components combined into kits intended for assembly - by others; -which are based in whole or in part on the Documentation. - -1.4 This Agreement applies to any Documentation which contains a -notice stating it is subject to the TAPR Open Hardware License, and to -all Products based in whole or in part on that Documentation. If -Documentation is distributed in an archive (such as a "zip" file) which -includes this document, all files in that archive are subject to this -Agreement unless they are specifically excluded. Each person who -contributes content to the Documentation is referred to in this -Agreement as a "Licensor." - -1.5 By (a) using, copying, modifying, or distributing the -Documentation, or (b) making or having Products made or distributing -them, you accept this Agreement, agree to comply with its terms, and -become a "Licensee." Any activity inconsistent with this Agreement will -automatically terminate your rights under it (including the immunities -from suit granted in Section 2), but the rights of others who have -received Documentation, or have obtained Products, directly or -indirectly from you will not be affected so long as they fully comply -with it themselves. - -1.6 This Agreement does not apply to software, firmware, or code -loaded into programmable devices which may be used in conjunction with -Documentation or Products. Such software is subject to the license -terms established by its copyright holder(s). - -2. Patents -2.1 Each Licensor grants you, every other Licensee, and every -possessor or user of Products a perpetual, worldwide, and royalty-free -immunity from suit under any patent, patent application, or other -intellectual property right which he or she controls, to the extent -necessary to make, have made, possess, use, and distribute Products. -This immunity does not extend to infringement arising from modifications -subsequently made by others. - -2.2 If you make or have Products made, or distribute Documentation -that you have modified, you grant every Licensor, every other Licensee, -and every possessor or user of Products a perpetual, worldwide, and -royalty-free immunity from suit under any patent, patent application, or -other intellectual property right which you control, to the extent -necessary to make, have made, possess, use, and distribute Products. -This immunity does not extend to infringement arising from modifications -subsequently made by others. - -2.3 To avoid doubt, providing Documentation to a third party for the -sole purpose of having that party make Products on your behalf is not -considered "distribution," and a third party's act of making Products -solely on your behalf does not cause that party to grant the immunity -described in the preceding paragraph. - -2.4 These grants of immunity are a material part of this Agreement, -and form a portion of the consideration given by each party to the -other. If any court judgment or legal agreement prevents you from -granting the immunity required by this Section, your rights under this -Agreement will terminate and you may no longer use, copy, modify or -distribute the Documentation, or make, have made, or distribute -Products. - -3. Modifications -You may modify the Documentation, and those modifications will become -part of the Documentation. They are subject to this Agreement, as are -Products based in whole or in part on them. If you distribute the -modified Documentation, or Products based in whole or in part upon it, -you must email the modified Documentation in a form compliant with -Section 4 to each Licensor who has provided an email address with the -Documentation. Attempting to send the email completes your obligations -under this Section and you need take no further action if any address -fails. - -4. Distributing Documentation -4.1 You may distribute unmodified copies of the Documentation in its -entirety in any medium, provided that you retain all copyright and other -notices (including references to this Agreement) included by each -Licensor, and include an unaltered copy of this Agreement. -4.2 You may distribute modified copies of the Documentation if you -comply with all the requirements of the preceding paragraph and: - (a) include a prominent notice in an ASCII or other open format - file identifying those elements of the Documentation that you - changed, and stating that the modifications are licensed under - the terms of this Agreement; - (b) include all new documentation files that you create, as well as - both the original and modified versions of each file you change - (files may be in your development tool's native file format, - but if reasonably possible, you must also include open format, - such as Gerber, ASCII, Postscript, or PDF, versions); - (c) do not change the terms of this Agreement with respect to - subsequent licensees; and - (d) if you make or have Products made, include in the Documentation - all elements reasonably required to permit others to make - Products, including Gerber, CAD/CAM and other files used for - manufacture. - -5. Making Products -5.1 You may use the Documentation to make or have Products made, -provided that each Product retains any notices included by the Licensor -(including, but not limited to, copyright notices on circuit boards). -5.2 You may distribute Products you make or have made, provided that -you include with each unit a copy of the Documentation in a form -consistent with Section 4. Alternatively, you may include either (i) an -offer valid for at least three years to provide that Documentation, at -no charge other than the reasonable cost of media and postage, to any -person who requests it; or (ii) a URL where that Documentation may be -downloaded, available for at least three years after you last distribute -the Product. - -6. NEW LICENSE VERSIONS -TAPR may publish updated versions of the OHL which retain the same -general provisions as the present version, but differ in detail to -address new problems or concerns, and carry a distinguishing version -number. If the Documentation specifies a version number which applies -to it and "any later version", you may choose either that version or any -later version published by TAPR. If the Documentation does not specify -a version number, you may choose any version ever published by TAPR. -TAPR owns the copyright to the OHL, but grants permission to any person -to copy, distribute, and use it in unmodified form. - -7. WARRANTY AND LIABILITY LIMITATIONS -7.1 THE DOCUMENTATION IS PROVIDED ON AN "AS-IS" BASIS WITHOUT -WARRANTY OF ANY KIND, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ALL -WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND -TITLE, ARE HEREBY EXPRESSLY DISCLAIMED. -7.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ANY LICENSOR -BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE, OR EXEMPLARY DAMAGES ARISING OUT OF -THE USE OF, OR INABILITY TO USE, THE DOCUMENTATION OR PRODUCTS, -INCLUDING BUT NOT LIMITED TO CLAIMS OF INTELLECTUAL PROPERTY -INFRINGEMENT OR LOSS OF DATA, EVEN IF THAT PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. -7.3 You agree that the foregoing limitations are reasonable due to -the non-financial nature of the transaction represented by this -Agreement, and acknowledge that were it not for these limitations, the -Licensor(s) would not be willing to make the Documentation available to -you. -7.4 You agree to defend, indemnify, and hold each Licensor harmless -from any claim brought by a third party alleging any defect in the -design, manufacture, or operation of any Product which you make, have -made, or distribute pursuant to this Agreement. - #### diff --git a/Makefile b/Makefile deleted file mode 100644 index a0c9fffe..00000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# Makefile for Wispcar schematics -# Generates sch PDF -# Derived from the BlackfinOne Makefile - thanks Ivan - -SCH_FILES = wispcar -PROJECT = wispcar -REV := $(shell svn info | grep Revision | sed 's/Revision: //') - -SCHPS = $(addsuffix .ps,$(SCH_FILES)) -SCHPDF = $(addsuffix .sch.ps,$(SCH_FILES)) -PWD = $(shell pwd) - -PCB_PRINT_OPTIONS = --ps-color --media A4 - -all: schpdf - -%.ps: %.sch - gschem -o $@ -s gschem-print.scm $^ - -schpdf: $(SCHPS) - -rm *_sch.ps - # sed stuff enlarges gschem font which is too small for my eyes :-) - cat $(SCHPS) | sed 's/scalefont/1.5 mul scalefont/' > $(PROJECT)_sch.ps - ps2pdf $(PROJECT)_sch.ps $(PROJECT)_sch.pdf - diff --git a/countdown.c b/countdown.c deleted file mode 100644 index a35575bf..00000000 --- a/countdown.c +++ /dev/null @@ -1,37 +0,0 @@ -/* used to prototype algorithm for 3 digit count down timer used in wispcar.asm */ - -#include -#include - -int main() { - int x,y,z; - - x = 1; - y = 2; - z = 3; - - while(1) { - if (z == 0) { - if (y == 0) { - if (x == 0) { - exit(0); - } - else { - x--; - y = 9; - z = 9; - } - } - else { - y--; - z = 9; - } - } - else { - z--; - } - printf("%d%d%d\n",x,y,z); - } - -} - diff --git a/documentation.txt b/documentation.txt deleted file mode 100644 index b350ce2f..00000000 --- a/documentation.txt +++ /dev/null @@ -1,179 +0,0 @@ -documentation.txt -Created by David Rowe May 2008 -Wispcar project - -Files ------ - -wispcar.asm........: PIC source code, compile and simulate - with Windows MPLAB 8.10 (free download) - Also explains Wispcar commands -wispcar.sch........: gEDA gschem schematic -Makefile...........: Creates PDF of schematic -documentation.txt..: This file - -Project Plan ------------- - -[ ] WP100 Documentation - [ ] Create SVN repository - [ ] Draw schematic - [ ] Write Test Report - + Discuss tests performed - + how to repeat them - + results - [ ] Software - [ ] Write Design Notes - + explain various sections of design - + discuss trade offs - -[ ] WP200 Prototype Development - [ ] Breadboard Prototype - [X] PIC with RS232 - [X] Current sensor - + high-side op-amp differential amp - [X] Power Switch - + used to switch power to AP - + controlled by watchdog and sleep function - [ ] Linear Regulator - [X] Watchdog software - [X] Sleep software - [ ] Construct Soldered Prototype - [ ] Install in Solar powered AP (Rowetel) - -[ ] WP300 Testing - [ ] Test to determine watchdog doesn't fire by mistake - + leave running for 1 week - + stable power & router - + ensure watchdog doesn't fire by mistake - [ ] Dirty power test - + work out a way to simulate a poor power supply - + for example put power supply in series with transformer - secondary, then modulate primary with pulses - + this will give big spikes on power line - + make sure PIC never hangs - [ ] Brown out test - + vary Vbat from 30V down to 2V 10 times - + make sure PIC does not hang - -Specs: ------ - -1/ Measures Vbat and Ibat. - - Vbat between 5 and 60V - Ibat between 0 and 5A - - Measures Vbat and Ibat and reports every 1 sec to Host. - -2/ Watchdog - - Fires if no RS232 rx for TBD1 secs from host - Power is shut off for 5 seconds then reapplied - -3/ Sleep - - Send "sleepXXXX" to put power supply to sleep for XXXX seconds - -4/ Current consumption (estimated) - - Vbat = 30V I=2mA - Vbat = 5V I=2mA - - Note: we need to work out a way to get 60V operation, 78L05 - regulator can't go above 35V. - -References ----------- - -1/ Zener power supply design: - - http://www.kpsec.freeuk.com/powersup.htm - -2/ PIC10F510 datasheet from Microchip - -3/ 78L05 datasheet - -4/ IRF9540 datasheet - -Credits -------- - -Tim Ansell (Mithro) for lending me his PIC collection and programmer -Yahel Ben-David - -Notes ------ - -1/ IRF9640 FET was selected largely at random. At 19A max it may be -overkill, a cheaper FET may be more suitable. - -2/ The RS232 polarity may need to change when directly connected to a -router without level conversion, see reference docs for RS232 software -UART code in wispcar.asm. I used a MAX232 type chip for interfacing -the RS232 tx & rx to a PC's serial port for testing. - -Gotcha ------- - -Can only use 'call' to call an address in the first 256 bytes, so put -all funcs at the start of the program, main at the end. - -TODO List ---------- - -[ ] schematic - [ ] pinout of 78L05 - [ ] pinout of power FET - [ ] pinout of BC548 - [ ] connect + & - together on unsued op-amp sections - [ ] TAPR open harwdare license - -[ ] svn repository - + with datasheet pdfs ? -[ ] wire correctly for power on reset - + test with dodgy power on curve (slow power up) -[ ] blog post -[ ] README in SVN -[ ] test with WRT54 -[ ] add brown out detector to PIC reset to be double sure? - + see PIC data sheet -[ ] check what happens in overvoltage on input, how can we protect? -[ ] document test plan -[X] make sure we can't stall in RS232 input routine - + need a way to get around this..... - + malformed RS323 could cause a hang - + maybe better to just look at h/l transition or something? - + sep pic for sleep function? - + solution: integrate 1 sec delay with RS232 rx -[ ] Limitations - + need to send full command before 1 second delay? - + like send command immediately after ADC data - + need automatic reset from fragment - + like once every second - + or can it be spread over cycles? -[ ] enable PIC watchdog timer - + how can we test? -[ ] make sure all RS232 chars OK - + how to prog with calibrated clock? - + check baud rate - + is max232 OK at Vcc=5V? -[ ] programming procedure to preserve osccal -[X] make function to print decimal, rather than repeating all that code - + we can't as call stack is only two levels deep and we are at the limit - -[ ] automatic thrash tests (repeat each one for hours/days) - + maybe use expect - [ ] send sleep - + make sure we sleep - [ ] send 'w' - + make sure we dont WD time out - [ ] check for unlikely WD/sleep/reboot events - + especially under nasty conditions - -[ ] check how accurate the timing is - + is 1 sec delay accurate? - -[ ] work out how to run from 60V - + 78L05 pops at 35V -