Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zigzagjoe

Pages: [1]
1
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 28, 2013, 07:42:14 pm »
A mic? Not sure if it has enough ram to do anything with analog signal processing.


@zigzagjoe really nice and cheap. The ram would be kind of a problem though. Aren't there cpu in that series with more ram?

Yeah, you can get ones with more RAM and ROM, but only in surface mount packages. That's one of two ARM chips in a DIP form factor available, so went with it in in the spirit of a hobbyist-friendly design. Other one is an 8-pin relative with even fewer resources, definitely not going to cut it.

If you throw DIP out the window, though, there's a lot of options - USB client, as much RAM/ROM as you could want, and more powerful Cortex-M3/M4 cores, to name a few. Possibly even a display interface, though that would increase complexity quite a bit.

Truthfully, it probably makes the most sense to just get a board made anyways, seeing as there are very few graphical LCD modules with through-hole-friendly layouts. FPC connectors, which you'd use for the display proposed by the OP, are all SMD. That color LCD is a hair better in that it has solder pads that you could conceivably solder wires to, but it's meant to be soldered to a board.

It'd also allow you to integrate a keyboard matrix for a semi-handheld product. As long as you don't go whole hog with BGA chips, SMD can be done at home without *too much* effort via a heat gun or toaster oven. Have even heard of people doing it purely by hand.

I think it could be a fun project anyways, working with the limited resources of the LPC1114. You would want most code to be interpreted code, with just the lowest level routines stored in ROM. Bootloader, input, low-level comms (rs232 or usb), display routines, storage routines, floating-point emulation, interpreter (obviously), and a basic monitor program. All the stuff that needs to be fast. Still, going to have a look to see what $3 gets you in a SMD ARM chip.

Re: eLua. Not enough RAM/ROM to manage it. You'd want as minimalistic a language as possible, if using the LPC1114. Fancier [SMD] ARM chips would have enough RAM that you could set things up that entire user binaries could be copied to a specific offset in RAM and execute them from there.

2
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 28, 2013, 04:56:36 pm »
Was bored, so finished hashing out the ARM-based idea. Click here for google doc with block diagram, pin assignments and parts manifest.

Too bad this is the only DIP ARM chip out there; it's a bit IO constrained, though you could free up to 3 GPIO pins along with 8 bit data bus and SPI, at the cost of piezo speaker and PC link. One more GPIO if the reset switch is deemed unnecessary... could just use a momentary-off switch on Vpp for the same effect, i suppose?

An interesting idea I had is that from whatever interpreted language, an ARM routine could be loaded into RAM and run from RAM to effect an increase in speed in crucial areas. Kind of want to build it... would be fun to write the core code.

3
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 09:42:40 pm »
The SPI interface is what you are using to send SD commands. You most certainly are not accessing it 'exactly the same' as a flash chip - the physical interfaces are the same, the software interfaces are very different. Don't dismiss what I'm saying out of hand - you do not know everything. Again, see Sd2Card.cpp. That is the interface you will need to use to read and write blocks from a SD card.

Yes, there is a portion for software SPI, there is also a portion for hardware SPI. Yes, it has a FAT component, which is not part of Sd2Card.cpp - it's written in layers, of which Sd2Card is the lowest, and directly interfaces with the SD card. Fat functions use Sd2Card, and so on. Course, you can have a look at those if you like (can be rather terrifying).

4
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 09:15:59 pm »
You're still going to have to deal with the SD interface, which is quite a bit more complex than a SPI/I2C flash will be. I'd recommend looking over sdfatlib (AVR code) to see just exactly what you're getting into. Specifically, Sd2Card.cpp and Sd2Card.h. Also, low-level access to a device is a privileged operation, will complicate PC software to some degree.

FTDI cable is another way of accomplishing serial over USB; was suggesting the virtual com port method of serial (or raw HID) in the context of that ARM design - not actually using serial, just showing up like that to the PC. Can simplify programming of the link software.

5
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 08:52:55 pm »
Not for binary program memory, no; there's no way around that for either MCU without using one that exposes some of its internal bus. But for an interpreted program, it could be used to defray operating expenses of a SD card, possibly. Would be unable to keep much/any user code in RAM. Just something interesting i saw, anyways.

Linking software can get messy if it's allowed to grow out of control, but it'd be superior to using SD card in terms of access speed and ease. At the simplest level, though, linking software is quite simple, especially compared to rolling a whole SD stack. Of course, you'd want to implement either serial over USB or just plain bit banged serial, but hey, options. For programming, eeprom usage would be more deterministic than FAT layered on SD; simpler to deal with.

Just some thoughts, anyways.

6
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 07:27:41 pm »
Unfortunately, it looks like eeproms only go up to 128k (1mbit) in DIP packages. Though, there is this flash chip. 8 pin DIP, 1mb (8 megabit), 52 cents. Page size is 256b, which is okay. Obviously the byte level access an EEPROM could provide would be better, but this is still nice. Will be vastly simpler to interface with compared to a SD, even with having to deal with pages.

Here's the 128k I2C eeprom: http://www.digikey.com/product-detail/en/CAT24M01LI-G/CAT24M01LI-GOS-ND/2683760

Also, Here's a 128k SPI SRAM (?!): http://www.digikey.com/product-detail/en/23LC1024-I%2FP/23LC1024-I%2FP-ND/3543083
Could be interesting....

7
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 07:18:45 pm »
z8, which the ez8 is based on, is just as elderly as the z80. Sorry, should have made that more clear. The ez8 is faster than the z8, but it will still be blown out of the water by any newer processor - such as the ARM Cortex-M0, powering that one chip, which is fully pipelined nevermind 32 bit and running at several times the clock frequency.

The ARM chip I linked was a microcontroller, too - no need to futz with ROM and RAM chips. If you give up DIP requirement, even more options become available. Could also use a module such as the teensy3 rather than a raw MCU, but it drives price up. That specific one, the LPC1114, has 22 IO pins available, which based on some quick futzing about is sufficient for the set up I described. Also, has 4kb of SRAM, vs 2kb per ez8 chip. 50mhz also strikes me as quite a reasonable speed. The IO pins are the hardest part, relatively, and with a shift register (or PS/2 instead) it's a nonissue.

Code size is a concern, though with thumb available it reduces the damage to some degree. Additionally, ARM/Thumb instructions are likely more powerful on a per instruction basis thus *possibly* leading to fewer instructions. Would need to do research to confirm that, though. Going to be hard to fit much more than a basic OS, library routines, and a simple interpreter in either of their ROM spaces, though. Achilles's heel.

The shift register was mentioned due to IO constraints of that specific ARM chip; it lowers the pin requirement to where that chip is usable. For scanning a key matrix, the speed reduction is largely moot. Or, of course, just use PS/2 and don't worry about it.

Yes, that LCD is cheaper, but it's also greyscale at a fraction of the resolution. For $4 more, it seems to me that getting colour and significantly more pixels is quite worth it. Does use more power, though, due to the backlighting.

Accessing a SD is not as easy as you seem to think, though: even throwing filesystems out the window, you must operate on a 512byte block basis, which eats into available RAM. Using the fatlib for AVR as a guideline, you are looking at something like 600-1200 bytes of RAM dedicated to the SD interface (with a FS), never mind code size. Implementing a PC-compatible FS, such as FAT32, will drive complexity way up, and be a pain to write with the lack of good development tools. No PC compatible FS throws away the primary benefit to using a removable storage interface. An i2c flash/eeprom IC will be far simpler to deal with, and maybe save a few pins, too.

USB I mentioned simply because you could: the 50mhz ARM can manage low-speed interfacing with user code active, and probably can do full speed interfacing (12mbs) with full cpu usage. It's a freebie - why not? A dedicated hardware interface is much better, as you say, but you can't get a DIP ARM chip that has it. The presence of a USB interface would also be a point in favor of not using a SD card. A USB stack will use up some RAM and ROM, though.

There are ez80 MCUs, but they are only available in large SMD packages. Pain in the ass to deal with for a hobbyist. Basically, I mentioned this first because it was a fun thought-experiment, and second because two ez8s increases hardware complexity, code complexity, cost, power use and reduces performance.... for the gain of similar mnemonics. Buying a PI or other some such is boring; having a hardware design that one can understand and tweak as well as play with bare metal code is way more fun.

@Art_of_camelot: Registered mostly to reply to this post; I was bored, and it was fun to design a minimal system (as outlined in my post). Originally discovered it as I had to purchase a TI-84 C for a class - can't use 89 :( - and was doing research concerning it. Absolutely disgraceful what TI ended up shipping, also, could have been so much more.

EDIT: Spelling

8
Other / Re: z80-like portable computer for <$30! (If you build one)
« on: June 27, 2013, 05:45:53 pm »
Honestly, if you are going to make a design from scratch, you may as well use a more current design - the ez8 does not make that cut, being just as elderly as the z80. By the way, the only similarity between the z80 and the z8 is assembly mnemonic.... you will not be able to use existing code without a rewrite.

By the way, putting two independent CPUs will just increase the headaches involved in general purpose programming, rather like what happened to the sega saturn. Worse, these are microcontrollers, effectively independent systems by themselves - they will not be able to share a bus seeing as it's fully internal, and synchronization would be a nightmare. Unless one is going to be a dedicated co-processor handling IO, display, or other such things, it will be largely wasted as it would be incredibly cumbersome to use.

Since you won't be able to use any existing code anyways, you may as well go for an ARM chip, such as the LPC1114. 50mhz, 32-bit ARM Cortex-M0 with 4kb of SRAM and 32kb of flash. The SRAM and flash is unfortunately small, but it is still an order of magnitude more powerful then what you've suggested, never mind cheaper at less than 3$ per. Plus, it comes in a nice DIP package and has vastly more toolchain support - gcc.

Grab this 240x320 2.4" Color LCD - 15$. 3.3v-tolerant and has a built in ILI9340 controller again, requiring an 8 bit interface and 4 control lines (CS, WR, RD, RS).

Use an 8x8 key matrix: use the 8 pin data bus that is also connected to the LCD for input, and hook up a 74HC165 Shift-in register - 3 pins, CLK-out, LD-out, Ser-in to read it out. You may be able to find an existing keyboard module you could use, or just design a PCB. Alternatively, you could use PS/2 as you suggested.

2 more pins for a bit-banged USB interface - the ARM is easily fast enough to manage USB low speed, it should be able to manage full speed as well. SD card interface would occupy another 4 pins - MOSI, MISO, CLK, and CS; one of the SPI interfaces. Could use an I2C eeprom or flash instead of a SD card. Probably makes more sense: less overhead, by far.

Unfortunately, it seems that it would be difficult to use NXP's ISP interface in-situ, but the uC may be able to reprogram itself via a bootloader. If you could bake enough USB into the bootloader, programming could become quite simple. ASM programs will be incredibly difficult, however; 4kb of SRAM would be enough for some programs and overhead, but it's nowhere near enough for a complete binary program. An interpreted language would be possible, but honestly rather depressing. a Forth clone could be decent, though - not too much overhead in the interpreter.

Though, discussing a language now; doesn't that strike you as counting eggs before they hatch? You need to have working hardware before you can do much else, and it will not be as simple as buying all the parts and wiring them together - you will need hardware to program the uCs, as well as toolchains, debugging facilities (meter and logic analyzer), passives for LCD and uC(s). It's a great feeling to get it all together but it's a lot of work before you have something working. If you've got the background for it, by all means go for it, but if not I'd recommend playing with standalone microcontrollers first.

Pages: [1]