SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By janostman
#171025
I'm currently developing a pocket gamepad based on the LPC-812 ARM Cortex M0+ and a ILI9340 2.2-inch color TFT with SD-card reader.

It has librarys for 2D, 3D-polygon and raycasting graphics with a 320x240 262K resolution.
Also library's for 16-bit 4-channel PCM audio.

Check it out at http://igg.me/at/armpocket

Really cool
By janostman
#171051
It now has a smaller cousine (keyring size), The Pico-3D.
It uses a 128x64 OLED display.

Haven't decided yet if I'll use and ARM or a Pro Mini on this one.
It has considerably less data to push for each frame.
8192 mono pixels compared to 76800 color pixel.

But it's a very cool little toy.
You do not have the required permissions to view the files attached to this post.
User avatar
By Ross Robotics
#171059
Nice project. I would try to use an Atmega chip as it will keep the cost down.

In your video, it looks like the display is just playing a video.. Have you incorporated any control yet?
By janostman
#171063
The buttons are not yet soldered to any portpins so BUTTON_LEFT is set to 1 constantly in the loop causing the camera to rotate.

I'll try a Pro Mini on the smaller one.
By janostman
#171065
Ok, it's ATmega328 for the Pico-3D
You do not have the required permissions to view the files attached to this post.
By janostman
#171148
I got the Pico-3D running.
I'm only running it at 16MHz because the need for 3.6v Power and batteries.

I'm currently optimizing the raycaster for the ATmega328.
Because it only has a monochrome display, the raycaster needs to run with textures.

A video will be up in a day or two.
User avatar
By Ross Robotics
#171158
Nice, will be looking for a vid. Are you planning on selling these or you going for open-source?
By janostman
#171177
I was thinking of selling the hardware with librarys and have the software open source.
User avatar
By Ross Robotics
#171182
You could sell the hardware as a kit to keep your labor down, but I would host the hardware schematics somewhere and the software. This way you can support the open source community and make a little money.

Now if you only had enough memory to add in some targets and shoot some pixels at them!
By janostman
#171185
The raycaster as is only uses 6.9K flash and 1K SRAM with one 512byte texture and one 576byte 24x24 worldmap.
That includes the display driver.

I removed the Adafruit SSD1306 library and wrote my own because the library used 10K alone. Ouch!
It still needs to be more optimized for speed using assembly code.

Plenty left over for a game.

it will runs straight on a 1284P for 128K flash and 16K SRAM.

Since this one has no SD-Card interface I was planning to add a 2Mbyte SPI-flash to store a lot more.
I'll post the schematics and the code.
Last edited by janostman on Fri May 16, 2014 1:37 am, edited 1 time in total.
By janostman
#171186
You could run the 2.2-inch color TFT with an ATmega to.

But the problem is that the SPI can only run at a max speed of 8Mbps and that is a bit slow for 76800pixels and 2bytes per pixel.

The hardware is dead simple.

6 buttons connected to PORTC, The OLED connected to MOSI, CLK, DC, CS and Reset and a 16MHz Xtal with 2 22pF caps.
That's all.

For sound it also needs a piezo speaker.
You do not have the required permissions to view the files attached to this post.
User avatar
By Ross Robotics
#171198
I removed the Adafruit SSD1306 library and wrote my own because the library used 10K alone. Ouch!
It still needs to be more optimized for speed using assembly code.

Plenty left over for a game.
Ah, so that's why you said "hardware with libraries." I agree that 10K is way too much but it probably has other features which you don't need. I really don't know since I haven't used the SSD1306 library.

I'm guessing that these run at 3.3V? I don't know how much of a performance boost this will be, but have you thought about running an ATmega at 20 MHz? This would mean you would have to run5V though it. Just a thought though..

Have you thought about a case/enclosure for it? I have a 3D printer and use Solidworks for the design stage. Would make a nice finished product.
By janostman
#171203
Yes, at 5v it can even run at 30MHz if required but then it would have to carry batteries for 5v and not 3v
At 3.6v it will probably run at 20MHz.

Don't know what the Arduino IDE would say about my Adaboot 328 at 20MHz?
At other frequencies than 16MHz I have always used an ISP for programming.

Thanks for the 3D-printing offer. That would look nice.
Not sure how I would go about sending you the 3D-model?

The size as now is about the same size as a Huawei 3G modem dongle.

I'm not quite finished with the power options yet.
It could run at 1.5v through a DC-DC converter to 3.6v.

Or at 3.6v Li-Ion straight?
You do not have the required permissions to view the files attached to this post.
Last edited by janostman on Fri May 16, 2014 3:54 pm, edited 1 time in total.