搜索
bottom↓
回复: 7

The DIY Laptop (LCD做的电脑)

[复制链接]

出0入0汤圆

发表于 2008-4-8 15:37:35 | 显示全部楼层 |阅读模式
Chris Fenton’s DIY Laptop Page

*note*: I am now employed, but if you have questions feel free to email me at:    cfenton (AT) usc.edu
            Ever thought to yourself, “Hey, I could probably build my own computer if I really tried.” Or maybe, “Man, I really need a laptop with an embarrassingly low-resolution display, a processor that goes at 256 Instructions/sec, and I’ve only got $50 to spend!”  Well, that’s how I got here! It took me about 4 months to complete, with a number of pauses when school and life intervened, but I’m now mostly finished with my first real DIY project.
Specs:
            -Processor: PICAXE 18X Microcontroller
            -User Memory: 96 Bytes of RAM (with plans to upgrade to 8K later)
            -User Program storage: 10 Compiled Programs, 4 editable programs
            -Display: 20x4 blue & white, backlit LCD serial character display
            -Interface: Full-sized laptop keyboard (12” across)
            -On-board software (all written by me, of course!):
·        Compiled-Chris++ interpreter (my own language! ~256 Instructions/sec)
·        Text Editor with the ability to actively work on 4 different programs at a time
·        Chris++ Compiler to convert text files to executable programs
·        Program Manager – Launch or delete executable programs


(原文件名:image001.jpg)


(原文件名:image002.jpg)


(原文件名:image003.jpg)


(原文件名:image004.jpg)


(原文件名:image005.jpg)


(原文件名:image006.jpg)


For those of you wondering why I used a high-level language like BASIC to, in essence, write an assembly language interpreter, I’ve decided to provide a little background information. This project started out as an attempt to write a single-chip “emulator” for a small processor I had designed to run inside an FPGA (AKA the “Fentium”). The Fentium was designed as a “minimal instruction-set” computer (MISC?), so it initially only had 8 total instructions (the least number possible, as far as I can tell). Hence, “Chris++” was born, as the assembly language for the Fentium processor. That project turned out to be much less ambitious than I had initially thought, and I was able to make a full-fledged, single-chip “Fentium” emulator in only a few hours. At that point, I realized that if I added a couple more instructions it might actually be useful for something. Then I realized I would need a compiler so I could actually write Chris++ in a semi-readable way, and I thought, “hey, why not add in a text editor so I can just do it all on the same chip!” Toss in a file manager, some user-interfaces, a bus protocol to make it expandable . . . You can obviously see where this line of thought brought me.  

For now, here is a brief description of Chris++ language that it runs:
========================================================================================================
=================================Chris++ Interpreter==========================================================
========================================================================================================
CMD           Hex                      ASM                Length              Operand
opload            00                     LOD               2-bytes             Indirect                          -> Place (RAM) in accumulator
opadd             01                    ADD                2-bytes             Indirect                         -> Add (RAM) to accumulator
opcomp          02                     CMP               2-bytes             Immediate                     -> Compare #imm to accumulator, place result in accumulator
opsub             03                     SUB                2-bytes             Indirect                         -> Subtract (RAM) from accumulator
opjmp             04                    JMP                 4-bytes             Immediate                     -> Jump to #Location
opcjmpeq       05                     JEQ                 4-bytes             Immediate                     -> Gosub to #Location if accumulator = 255
opstor             06                    STR                 2-bytes             Immediate                     -> Store accumulator in #RAM
oploadimm      07                    LDI                  2-bytes             Immediate                     -> Load #imm into accumulator
sertoslave        08                    SND                4-bytes             Immediate                     -> Send 3 bytes to (current ShortBus ID)
opmult             09                    MLT                2-bytes             Indirect                         -> Multiply accumulator by (RAM)
opdiv               0A                   DIV                 2-bytes             Indirect                         -> Divide accumulator by (RAM)
opcjmpnq        0B                   JNQ                 4-bytes             Immediate                     -> Gosub to #Location if accumulator != 255
opgetkey         0C                   KEY                2-bytes             ACC                             -> Place keyboard input into accumulator
waitforslave     0D                   GET                 2-bytes             ACC                            -> Receive one byte from slave, set SBID to slave value
opsetSBID      0E                    SSB                 2-bytes             Immediate                     -> Set ShortBus ID value to accumulator value
opadc              0F                   ADC                2-bytes             ACC                            -> Read ADC and place it in accumulator
opgetSBID      10                    GSB                 2-bytes             ACC                            -> Place ShortBus ID value in accumulator
opdisp             11                    DSP                 2-bytes             ACC                            -> Send accumulator value to display
opAND           12                    AND                2-bytes             Immediate                    -> Logical AND of accumulator and #imm, place in ACC
opOR              13                    ORX                2-bytes             Immediate                    -> Logical OR of accumulator and #imm, place in ACC
opXOR            14                   XOR                2-bytes             Immediate                    -> Logical XOR of accumulator and #imm, place in ACC
opANDNOT    15                  ADT                 2-bytes             Immediate                    -> Logical ANDNOT of accumulator and #imm, place in ACC
opORNOT       16                  ONT                2-bytes             Immediate                     -> Logical ORNOT of accumulator and #imm, place in ACC
opXNOR          17                  XNR                2-bytes             Immediate                    -> Logical XNOR of accumulator and #imm, place in ACC
opEnd               18                  END                2-bytes             Immediate                     -> End Program and return to main menu
opRTN              19                  RTN                2-bytes             Immediate                    -> Return to location after last Gosub

===========================================================================================================
The code and a slightly better explanation of Chris++ has been posted! The beautiful wood-working was all done using 3/16” bass wood acquired from my university bookstore, and lovingly assembled using epoxy and my shiny new dremel (thanks Dad!).


原贴:http://www-scf.usc.edu/~cfenton/laptop.htm

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2008-4-8 16:23:22 | 显示全部楼层
有创意,用12864就更好了.
小曹最近发了好多东西,哪里来的啊,介绍一下!

出0入0汤圆

 楼主| 发表于 2008-4-8 16:25:32 | 显示全部楼层
我的收藏夹      

上传火狐浏览器收藏夹(书签)
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=961144&bbs_page_no=1&search_mode=3&search_text=caolong&bbs_id=9999

出0入0汤圆

发表于 2008-4-10 07:43:51 | 显示全部楼层
他所传的绝大部分是来自网络,而且他传的很多我都已经看过了。

出0入0汤圆

发表于 2008-4-11 20:35:09 | 显示全部楼层
LS的不要的嘛。。。

出0入0汤圆

发表于 2010-12-24 11:32:26 | 显示全部楼层
mark

出0入0汤圆

发表于 2010-12-25 21:03:12 | 显示全部楼层
呵呵,搞笑。

出0入25汤圆

发表于 2010-12-25 21:53:42 | 显示全部楼层
创意
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-19 14:37

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表