 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > TriBladeProp PCB: Uses 3 Propeller ICs for a Single Board Computer (SBC) | Forum Quick Jump
|
|  Dr_Acula Registered Member

       Date Joined Dec 2008 Total Posts : 606 | Posted 9/5/2009 5:03 AM (GMT -8) |   | Looking forward to seeing the code.
My CP/M skynet just went live today. Well, maybe not skynet, but I have a board sitting in a shed 100 metres from my house and it is running some sbasic code, and I'm inside a steel frame house with a steel roof and I know that 2.4Ghz wifi can't get even go half the distance to the shed, and yet I can sit here and type PING <BOARDNAME> and 1 second later I get PONG back. Wifi and this network are both 10mW, but that is the cool thing about 433Mhz vs 2.4Ghz, plus the super sensitive -123db gain on the Rx.
Wireless CP/M goes further than Wifi!
Next challenge - get the zicog/triblade into the network. The triblade uses much less power, and that is important when running on solar. Or robotics. There is a bit of a catch though - the CP/M network runs at only 1200 baud (it could run faster but slower baud rates=longer distance) and I've been talking at 38400 then changing on the fly to 1200. For that, I need a few ports. I was wondering if I could please reserve ports 96,97,98,99,104,105 106 and 107? I don't think those clash with any being used by other bits of code.
The other catch is that this really needs two RS232 connections. Or 1 connection, and one local keyboard and one local display. So you can type things into the board and see the printout, but not have those bytes going out onto the airwaves. On the N8VEM the local display is an LCD display using 6 wires. There must be a cunning way to do that. eg - Q7 on the HC573 isn't going anywhere - could I run that to pin 11 on another latch chip, and run the data lines into that latch chip, and with just one more chip add a 20x4 LCD display?? Or does the new board/design render this sort of thing obsolete?
But before that, I guess the next thing is to get heater's code into a triblade. Heater, if you put just the minimum files on your drive I> (now drive A>) and zip it, how small does it go? Or is bootgen really that simple?! And, I guess I've asked this before, are you not running a triblade because of a) lack of a sd socket or b) lack of a ram chip? I've got some spare ram chips (I didn't need to make the missiles after all) and ?? does cluso have a sd socket? It is just it could really simplify things if we all had the same hardware.
And, I have to ask, how fast is your bootup now? www.smarthome.viviti.com/buildPost Edited (Dr_Acula) : 9/5/2009 1:13:00 PM GMT
Image Attachment :
 PingPong.jpg 14KB (image/jpeg)This image has been viewed 33 time(s). | | | |
| | Back to Top | | |
 |  heater Registered Member

       Date Joined Feb 2008 Total Posts : 1832 | Posted 9/5/2009 5:44 AM (GMT -8) |   | At the risk of sounding like Mallred I have to announce that I cannot reveal the latest OS just yet. No, you see I have developed all this for a secret military high reliability, low power, global wireless networking project that will remain functional during the nuclear winter, slap, Err umm no sorry, I have to go shopping before the wife gets home from work....
Interesting what you say about 433MHz, here in Scandinavia they are now recycling the old mobile phone band at 450 MHz for use in data communication for remote systems such as equipment status monitoring etc. We are hoping to get such a modem for evaluation soon.
I'm sure we could reserve the ports. I was thinking we may want to move the port addresses around (or mirror them) to accommodate PropIO which has limited I/O addressing. Lets see what we can do. It's all up for grabs on the Triblade as SIMH Altair compatibility has gone out the window.
Funny, the first time I got a CP/M prompt up on the Prop was with a 2 line LCD panel I had knocking around. That and a LED for debugging.
A zipped 8Mb A: disk is a whopping 376K bytes !!
Building CP/M with the new BIOS and using BOOTGEN is dead easy under SIMH. I will package up all required sources and some instructions with the next posting.
Boot up is about 1 second. But I'm starting from files in HUB. Still that directory scanning is damn quick now.
I would very much appreciate a RAM chip or two. I have now managed to obtain from the black market 2 DIP propellers including the last one the wild in Scandinavia. Most other parts are easy to get here.
OK, see you when I'm back from the bunker, err, shopping mall... For me, the past is not over yet. | | Back to Top | | |
 |  Cluso99 We live onboard

       Date Joined Apr 2008 Total Posts : 2276 | Posted 9/5/2009 7:15 AM (GMT -8) |   | Dr_A: Maybe you can draw a block diag of the connections you require? I am not quite sure of your config - what is standard, what you want to add, if this is permanently connected or just plugged in when you are "there", etc. Sure, almost anything is posible (except AI - for now anyway), but what is the best/easiest/fastest way to achieve this depends on what you are after.
I gather the LCD display is 6 pins plus power, so I presume 1 must be a strobe.
Are you using Blade #1 as a Terminal? If so, then you probably don't require the sram or latch which frees uo some prop pins and they can be "tapped" from the latch pins meaning they will take a SIL row of pins.
Rereading your post, I presume you are wanting to use just 1 prop with a 2 wire serial to interface to the wireless. Does the other interface (keyboard and LCD) need to be permanently attached, or is it just plugged in for testing? I presume the latter as you would not want to waste the power. If this is so, then there is an easier way if you only need 128KB SRAM. We can save the latch too! RetroBlade could do this too.
Today I saw a version of jazzed's 1.5" keychain photoframe for A$20 at JB HiFi. They had a 5" photoframe for $50 (I think). I bought a 2.5" from Target a month or so ago for about $25??? but it was aclearance sale and I couldn't find any more.
Heater: see the top of this thread for a simple build of Blade #2 to get ZiCog running - this is what I m currently using Let me know what parts you don't have/can't get (I don't have any uSD or FT232RL left). An even simpler system woud be the prop, xtal, 1xSRAM, 1x74HC73 or 74LVC573, microSD and a 3V3 regulator, power connector plus r's and c's. Use an external PropPlug. You don't even require the eeprom nor the 5V reg. Links to other interesting threads:
| | Back to Top | | |
        |  Dr_Acula Registered Member

       Date Joined Dec 2008 Total Posts : 606 | Posted 9/6/2009 3:18 PM (GMT -8) |   | | | |
    |  Cluso99 We live onboard

       Date Joined Apr 2008 Total Posts : 2276 | Posted 9/7/2009 12:31 AM (GMT -8) |   | |
Heater:
Just finished combining the code. Still need to do the few changes that TriBlade will require. I also have to change the hub allocation as it will not compile - exceeds 32KB I will post the update to this post in a few minutes.
re COMBOOT.COM couldn't you just read them into hub via spin from the SD boot tracks, or better still, from a FAT16 file like I do??
Links to other interesting threads:
Post Edited (Cluso99) : 9/7/2009 8:42:20 AM GMT File Attachment : zicog.spin 195KB (application/octet-stream) This file has been downloaded 10 time(s). File Attachment : zicog010_demo_rr108.spin 70KB (application/octet-stream) This file has been downloaded 10 time(s). | | Back to Top | | |
          |  Dr_Acula Registered Member

       Date Joined Dec 2008 Total Posts : 606 | Posted 9/7/2009 6:13 PM (GMT -8) |   | Going off on a bit of a tangent here, heater asked in a PM about the source for BOOTGEN.COM.
I'm looking into how to get the boot ROM code working. Basically I'd like to have the boot code just read sectors sequentially off the SD for minimum boot times. Get rid of all that sector skewing that is in there now. This means eventually having to write a modified BOOTGEN so that TriBlade can rebuild CP/M and install it itself without SIMH. heater
I can't seem to find this. Just to brainstorm a bit about how to build boot tracks, the first thing to say is that it is complex. I've spent a lot of time inside the N8VEM system so might have some insights there. The confusing part is that programs need to be compiled so they sit in a different part of memory. So you might have an .ORG F800 at the beginning and so all the jump instructions work at that location, but it produces a binary image that might sit somewhere else in memory until it is needed. And, at least in CP/M, you can't just pad out bytes before and after as there isn't 64k to play with. So for the N8VEM, each file has a beginning and and end and so has a known length. eg dbgmon starts with .ORG F800 and finishes with .ORG FFFF. But even though it ends with FFFF, it is not FFFF bytes long. It is in fact FFFF-F800 bytes long, and starts at 0100H (as it is directly after the loader-m program that is o0 to FF. And then you have to be careful each program does not overwrite its allowed length. This is a real pain when writing custom bits of code, eg the LCD display driver in the N8VEM which now is part of CP/M!
Because of the overwrite problem, I found it easiest (as did Andrew Lynch) to have the minimum number of programs. It comes down to three, and it could be easier to even go for one single program. But even with 3, it gets confusing as the program cpm22-zz.asm is in fact a combination of the three bits of CPM, ie the CCP, BDOS and BIOOS.
Bill Beech over at the N8VEM group has been working for some time on using the individual files in CP/M and trying to keep the source files as 'pure' as possible. He would be the expert to ask on this problem.
This is the build batch file for the N8VEM
tasm -t80 -b loader-m.asm loader-m.bin tasm -t80 -b dbgmon.asm dbgmon.bin tasm -t80 -b cpm22-zz.asm cpm22-zz.bin copy /B loader-m.bin+dbgmon.bin+cpm22-zz.bin+BDRIVE.BIN Romimage.bin pause
They all have fixed lengths and then the DOS command copy /b joins them all together.
Now, if you want to do the compiling in CP/M it gets a bit more complex. You need ddt and you even need to compile and run programs to move code around before even doing the compiling. This is the dump of syscpm2.sub
; Create a bootable image on disk A: of CP/M with CCP ; Based on original Digital Research sources for CCP and BDOS ; Required sources are CFGCCP.LIB, MOVER.MAC, CCP.MAC, BDOS.MAC, CBIOSX.MAC ; Required programs: M80.COM, L80.COM, DDT.COM, BOOT.COM, BOOTGEN.COM XSUB ; get correct configuration PIP MEMCFG.LIB=CFGCCP.LIB ; create MOVER.COM M80 =MOVER/M L80 MOVER,MOVER/N/E ERA MOVER.REL ; create CCP.COM M80 =CCP/M L80 CCP,CCP/N/E ERA CCP.REL ; create BDOS.COM M80 =BDOS/M L80 BDOS,BDOS/N/E ERA BDOS.REL ; create CBIOSX.COM M80 =CBIOSX/M L80 CBIOSX,CBIOSX/N/E ERA CBIOSX.REL ; put pieces together DDT F100 5C00 0 IMOVER.COM R0000 ICCP.COM R0900 IBDOS.COM R1100 ICBIOSX.COM R1F00 G0 ; create boot file SAVE 44 CPMBOOT.COM ERA MOVER.COM ERA CCP.COM ERA BDOS.COM ERA CBIOSX.COM ERA MEMCFG.LIB ; now perform a cold boot to get rid of XSUB ; this restores the original BIOS jump vector which is required by BOOTGEN BOOT ; write boot file to reserved tracks, must be last command BOOTGEN CPMBOOT.COM A:
The very last command is bootgen.com and that is the file we don't have the source for. But I'm not sure that matters. Just a few lines up is the command SAVE 44 CPMBOOT.COM
This is saving a simple binary file which I think is 256*44 = 11264 bytes. That fits as that is 2C00 and at the beginning the code looks like this (which is the compiled MOVER.MAC) - copied from the binary version and viewed with ddtz (z80 opcodes).
A>ddtz cpmboot.com DDT/Z [8101] High = 2CFF Max = 2CFF > l0100 0100 LD HL,0A00 0103 LD DE,DC00 0106 LD BC,2300 0109 LD A,(HL) 010A LD (DE),A 010B INC HL 010C INC DE 010D DEC BC 010E LD A,C 010F OR B 0110 JP NZ,0109 0113 JP F200 0116 NOP 0117 NOP 0118 NOP 0119 NOP >>
Then it is padded out with zeros to 0A00. This code simply takes 2300H bytes and copies them from 0A00 to DC00 and then jumps to F200. (in Z80 opcodes a LDIR could do it with even less instructions).
So, I think all you have to do is build a binary file with a shortened version of syscpm2.sub that ends after SAVE command, and adds a new BOOTGEN which we write, which takes any .COM or binary file and copies it to the boot tracks, with no sector skewing and no fancy interleaving of alternate sectors. It could then copy itself to high memory and execute.
I guess that could be some spin code. It could look at the boot tracks and copy (say) 16k (11k+ a bit spare) into the first 16k of the zicog emulation and then jump to 0000 in the zicog. If the code was the code above, the first thing it then does is copies cpm into high memory and executes.
What do you need to make that? Well, I think it needs a tiny little program that moves a file to the boottrack, but in the format we want, ie straight binary. If you want to run all this within CP/M (which I think is entirely possible), then you need a little machine code program to do this.
One thing I'm not entirely sure about is whether CP/M can write a sector to track 0 of drive n? I'm guessing here, but every drive has parameters and those parameters are set in the drive parameter block and cp/m may try to send the data to somewhere different based on its parameter block data. To keep things very simple and very consistent with all drives, I wonder if we could just say that whatever drives we create, they all should have some data on the first track that is copied 1:1 into ram and then executed? Spin may be able to do that easier than anything else. eg, you have 16k worth of data at location x in the working ram and you want to move it to track 0 on the disk image. Maybe a special I/O call to trigger that. Then a cp/m program that takes any .com program and puts it into ram at a known location (?? at 0A00 but it doesn't really matter). And certainly it would be easy to write a vb6 program to do the same from a binary file on a pc hard drive.
I've been looking at some source code for programs similar to BOOTGEN on the walnut creek archive, eg SYSGEN but they seem to be customised for different hardware.
Sorry for the long post. It has taken so long, maybe in the meantime heater/cluso have already solved this one ?! www.smarthome.viviti.com/buildPost Edited (Dr_Acula) : 9/8/2009 2:21:01 AM GMT | | Back to Top | | |
 | 848 posts in this thread. Viewing Page : | | Forum Information | Currently it is Friday, November 20, 2009 10:39 PM (GMT -8) There are a total of 393,734 posts in 55,521 threads. In the last 3 days there were 82 new threads and 700 reply posts. View Active Threads
| | Who's Online | This forum has 17687 registered members. Please welcome our newest member, mark09. 54 Guest(s), 2 Registered Member(s) are currently online. Details Todd Chapman, Sal Ammoniac |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|