1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-30 17:56:15 +02:00
Commit Graph

118 Commits

Author SHA1 Message Date
Werner Almesberger
4480b32c50 ubb-vga2.c: corrected and improved loading of the first TX word
- ubb-vga2.c (line): write the first word to the TX FIFO after starting
  the command or it is lost
- ubb-vga2.c (line): fetch the first word while waiting for the back
  porch, making sure we have plenty of time for cache effects
- ubb-vga2.c (line): we no longer need to prefetch the first word of
  the next line
2011-04-28 12:30:22 -03:00
Werner Almesberger
e94b3bbcfc ubb-vga2.c (line, frame): don't pass prefetch pointer but just use *p 2011-04-28 11:57:21 -03:00
Werner Almesberger
6414d92412 ubb-vga2.c: move display resolution to #defines
- ubb-vga2.c (XRES, line_words, session): don't hard-code the X resolution
- ubb-vga2.c (YRES, line_words, frame, session): don't hard-code the Y
  resolution
2011-04-28 02:14:15 -03:00
Werner Almesberger
c8f19a0b4c ubb-vga.pro: commit pcbnew preferences (from local layout experiments) 2011-04-28 02:10:58 -03:00
Werner Almesberger
6558f56de6 ubb-vga2: replaced threshold-based color mapping with color cube model
- ubb-vga.h (ccube_init, ccube_map), ccube.c: color mapper based on
  proximity in color cube
- grabfb.c (pattern, grabfb), ppmimg.c (pattern, convert): use the color
  cube mapper instead of inferios threshold-based mapping
- ubb-vga2.c (session): initialize the color cube
- ubb-vga.h (thres), grabfb.c (thres), ubb-vga2.c (usage, main): removed
  the threshold along with the option (-l) to set it
- Makefile (OBJS): added ccube.o
2011-04-28 01:18:03 -03:00
Werner Almesberger
f0eda51391 ubb-vga/ppmimg.c (pattern): corrected the pattern for un-doubled pixels 2011-04-28 00:59:30 -03:00
Werner Almesberger
080978ade0 ubb-vga2: added support for showing a PPM image
- Makefile (OBJS): added ppm.o and ppmimg.o
- ppm.h (load_ppm), ppm.c: PPM file loader, adapted from
  eda-tools/schhist/ppmdiff/ppmdiff.c
- ubb-vga.h (img_name, ppmimg), ppmimg.c: PPM image to frame buffer
  converter
- ubb-vga2.c (usage, main): the threshold is now set with the option -l
- ubb-vga2.c (usage, main): if a second argument is given, treat it as
  a PPM file
- ubb-vga2.c (usage): also documented option -t
2011-04-28 00:38:13 -03:00
Werner Almesberger
19f43a77c9 ubb-vga2: added test image generator (option -t)
- tstimg.c: test image generator
- Makefile (OBJS): added tstimg.o
- Makefile (LDFLAGS): tstimg.c needs libm
- ubb-vga2.c (session, main): pass image generator as a function pointer
- ubb-vga2.c (main): new option -t to select the test image generator
2011-04-27 23:31:39 -03:00
Werner Almesberger
8643e457fa ubb-vga2: move image generation out of the main program
- ubb-vga2.c (session, grab): made the frame buffer "void *" and pass
  frame buffer resolution
- ubb-vga.h: color encoding and items shared between compilation units
- ubb-vga2.c (thres, pattern, grab), grabfb.c: move to grabfb.c
- ubb-vga2.c (map): make global, for use by grabfb.c
- ubb-vga2.c (pick, pattern, tricolor, grid): removed obsolete test
  image generators
- Makefile (OBJS, ubb-vga2): added grabfb.o
- Makefile (clean): remove only .o files
- Makefile (spotless): remove only executables
2011-04-27 20:59:29 -03:00
Werner Almesberger
625d9877ab ubb-vga2.c: make frame buffer fully VGA-sized; more cleanup
- ubb-vga2.c (frame, grab, session): keep all 480 lines in the frame
  buffer instead of duplicating them on output
- ubb-vga2.c (bad): make "static"
- ubb-vga2.c (session, main): removed the "single" argument
- ubb-vga2.c (main): complain about timeouts only if any occurred
2011-04-27 20:20:59 -03:00
Werner Almesberger
9a455c55fc ubb-vga2.c: code cleanup and some fine-tuning 2011-04-27 18:28:09 -03:00
Werner Almesberger
a759723ed1 ubb-vga: added driver based on the MMC controller (highly experimental)
- ubb-vga2.c: use the MMC controler to stream the pixel data
- Makefile (all, clean): added ubb-vga2
2011-04-27 17:21:30 -03:00
Werner Almesberger
a794c4b1b2 ubb-vga: avoid diodes; redesign for luminance bit (Y) and MMC controller
- ubb-vga.sch: use resistive divider instead of diodes
- ubb-vga.sch, ubb-vga.c (VSYNC): moved VSYNC from DAT3 to CLK to make
  all MMC data lines available for pixel data
- ubb-vga.sch, ubb-vga.c (R): moved red from DAT2 to DAT3 for convenient
  access to the 4th channel
- ubb-vga.sch: added luminance (Y) channel
- ubb-vga.sch: added pull-down to HSYNC/CMD, for later use with the MMC
  controller
- ubb-vga.c (pdfuns, pdfunc, ben_setup, setup): make UBB signals GPIOs,
  in case someone left them in a different configuration
2011-04-27 16:48:07 -03:00
Werner Almesberger
ce1c6af24f ubb-vga/README: "single/double mode", not "single-double mode" 2011-04-25 00:06:25 -03:00
Werner Almesberger
e1e473edec renamed ubb-vga/res.fig to mapping.fig 2011-04-24 23:56:29 -03:00
Werner Almesberger
5df56a39b0 ubb-vga: documented single and double mode
- README: describe how single and double mode work
- res.fig: illustrate the mapping in single and double mode
2011-04-24 21:26:00 -03:00
Werner Almesberger
67107d0062 ubb-vga: option -d to double the number of set/clear pairs, improving resolution
- README: added compatibility of double mode
- ubb-vga.c (usage, main): new option -d to double the number of set/clear
  pairs (making lines longer and the apparent pixel clock slower)
- ubb-vga.c (grab, session, main): have a complete set/clear pair for each
  pixel in double mode
2011-04-24 21:09:50 -03:00
Werner Almesberger
dab839ab66 ubb-vga.c: moved line length and timing to variables
- ubb-vga.c (line_pairs, line, frame, tricolor, grid, session): line
  length is now kept in a variable, instead of hard-coding its value
  and the values derived from it
- ubb-vga.c (line_cycles, line, hdelay): the total line duration is now
  kept in a variable, instead of hard-coding it all over the place
2011-04-24 20:01:12 -03:00
Werner Almesberger
dae21696b3 ubb-vga.c: a bit more cleanup
- ubb-vga.c: added more section titles
- ubb-vga.c (pick, pattern): grouped pixel-generating functions with
  image generation
- ubb-vga.c (usage, main): properly parse command-line options ("getopt"
  is a bit of overkill at the moment but will be needed later)
2011-04-24 19:43:26 -03:00
Werner Almesberger
554c6645d8 ubb-vga.c: removed unused #defines and rearranged the code a little 2011-04-24 12:12:36 -03:00
Werner Almesberger
fb153b2bf3 ubb-vga/README: added title and compatibility list 2011-04-24 12:02:48 -03:00
Werner Almesberger
8bd7199d9e ubb-vga.c: removed commented-out code from earlier experiments
The history of the split prefetch code:

Once up on a time, I thought that it was important to stay very close
to the "official" pixel clock. We could do this when copying 32 bit
words from cache to the GPIO set/clear registers, but not when
shifting 8 bit values as we do now.

One problem with 32 bit values is that transferring that amount of
data exceeds the time available in the hsync pulse. Hence the idea
to split the prefetch between hsync pulse and horizontal front porch.

Note that we also split prefetches between the two VGA lines of each
QVGA line. This commit does not change that mechanism.

- ubb-vga.c (line, frame): removed code fragments for prefetch split
  between hsync pulse and front porch
- ubb-vga.c (line, frame): remove code fragments for measuring time
  relative to the rising edge of hsync (and letting the prefetch time
  control the hsync length), not the falling edge
2011-04-24 11:48:32 -03:00
Werner Almesberger
3b7a7caec1 renamed "video" to ubb-vga 2011-04-24 02:56:56 -03:00
Werner Almesberger
b11dc612e2 video/README: documented sources and implementation quirks 2011-04-24 02:54:55 -03:00
Werner Almesberger
7d95fe8a35 video/: added Makefile and schematics 2011-04-24 02:36:56 -03:00
Werner Almesberger
18f2957cd4 video.c: working version, with screen grabber 2011-04-24 00:10:23 -03:00
Werner Almesberger
b85ae15479 video/video.c: pseudo-VGA output (test pattern only) 2011-04-23 23:26:42 -03:00
Werner Almesberger
6ef2b394f9 avrdude/: fixed confusing typo in avrdude.conf, added tuxbrain's nanonote_ICSP
- nanonote-nxuart.patch (avrdude.conf): typo, CMD is signal 6, not 5 (by
  David Reyes Samblas Martinez)
- series, nanonote-icsp.patch (avrdude.conf): NanoNote ICSP 8:10 cable,
  by David Reyes Samblas Martinez
2011-03-09 17:28:24 -03:00
Werner Almesberger
d7874e306c avrdude/patches/: added skipping of untouched bytes in write/verify
- series, low-addr.patch: record the lowest address touched (only for
  ihex, all others default to 0)
- series, skip-low-addr.patch: skip untouched addresses in avr_read
  and avr_write
2011-03-09 01:50:51 -03:00
Werner Almesberger
ea5b8af399 avrdude/patches/nanonote.patch: oops, clock math was old, slightly broken version 2011-03-08 21:23:15 -03:00
Werner Almesberger
a8c10a0050 nxuart/fw/Makefile (prog): supply an 8 MHz clock while programming 2011-03-07 17:21:54 -03:00
Werner Almesberger
0c2b98274f avrdude/patches/nanonote.patch: added clock output with -x clk=#MHz
- nanonote.c (nanonote_open): increased register window to include clock
  and MMC controller registers
- nanonote.c (gpio_function): set a pin to function or GPIO
- nanonote.c (nanonote_initpgm, nanonote_parseextparams): accept the
  extended option clk=N where N is the clock frequency in (whole) MHz
- nanonote.c (nanonote_enable): if the clock option is set, switch CLK
  to function and output the specified clock
2011-03-07 17:07:44 -03:00
Werner Almesberger
fc324599df nxuart/fw/: renamed "uart" to "nxuart" as well
- uart.c: renamed to nxuart.c
- Makefile: abstracted project name through $(NAME)
2011-03-07 14:55:20 -03:00
Werner Almesberger
de826dd734 avrdude/patches: renamed "uart" to "nxuart"
- patches/series, patches/nanonote-uart.patch: renamed to
  patches/nanonote-nxuart.patch
- patches/nanonote-nxuart.patch: changed ID from "nanonote_uart" to
  "nanonote_nxuart"
- patches/nanonote-nxuart.patch: added "External" to title/description
2011-03-07 14:50:17 -03:00
Werner Almesberger
4fa0a3437e nxuart/: changed title in nxuart.sch and nxuart.brd 2011-03-07 14:47:26 -03:00
Werner Almesberger
5b14b505b4 uart/: great renaming to nxuart, including references in Makefile 2011-03-07 14:42:44 -03:00
Werner Almesberger
271a50f3c2 uart/avrdude: renamed to ./avrdude (i.e., moved to the top-level) 2011-03-07 13:49:28 -03:00
Werner Almesberger
a05155e15e usb/cam/Makefile: added dependency in Makefile itself; local parameter update 2011-03-07 13:43:36 -03:00
Werner Almesberger
3d3bf1507a uart/avrdude/README: updated build instructions and added OpenWRT
- README: removed unnecessary "make" run after second "configure"
- README: added brief explanation why we need to run "configure" twice
- README: added build instructions for OpenWRT
2011-02-27 09:09:00 -03:00
Werner Almesberger
daa6331650 ubb/cam/Makefile: use mkmk-simple 2011-02-15 04:20:51 -03:00
Werner Almesberger
0c56f05575 nanonote.patch: cleanup and properly power down on exit (also turns off LED)
- nanonote.c: remove some commented-out items
- nanonote.c (nanonote_powerdown): make all data lines inputs on exit,
  making it more likely that the target powers down
2011-02-15 00:34:43 -03:00
Werner Almesberger
36a44995cd avrdude/atmega32u2.patch: experimental configuration for the ATmega32U2 2011-02-11 08:51:55 -03:00
Werner Almesberger
0d6dddf85a nanonote.patch: decrease extra delay from 100 to 20 us (sufficient and faster) 2011-02-09 21:18:24 -03:00
Werner Almesberger
7fba9a2a51 ubb: cleaned up board for "production readiness"
- ubb.brd: added project name, license, and "qi-hw.com"
- ubb.brd: duplicated text on front copper layer to silk screen
- ubb.brd: changed component references to more meaningful information,
  in case they are printed on a PCB
- ubb.brd: removed unused layers
- ubb.brd: bumped version number to 110207
- Makefile: added commented-out "gerber" target, as a reminder
2011-02-07 07:05:40 -03:00
Werner Almesberger
0e203be5c2 uart.sch: KiCad resents 0.1", changed to 0.1 in 2011-02-06 17:42:16 -03:00
Werner Almesberger
375208a0da nanonote-atusb.patch (avrdude.conf.in): reassign pins for latest atusb-pgm 2011-02-04 17:57:42 -03:00
Werner Almesberger
9778f3fb1b uart/avrdude: various corrections
nanonote-uart.patch:

- avrdude.conf.in: CLK is reserved for clock output

nanonote.patch:

- nanonote.c (pin_map, nanonote_setpin, nanonote_getpin): make pin map
  zero-based
- nanonote.c (nanonote_setpin): instead of having out own delay loop
  setting the pin repeatedly, just add the delay we need to
  pgm->ispdelay+100
- nanonote.c (nanonote_setpin): increase delay for atusb-pgm
- nanonote.c (nanonote_getpin, nanonote_open): begin with all pins set
  to output and switch MISO only when read
2011-02-04 17:51:27 -03:00
Werner Almesberger
1557630a8b uart/avrdude: added patch for pin assignment of the ATUSB-pgm adapter 2011-02-03 22:00:46 -03:00
Werner Almesberger
9024942ac1 uart/avrdude: moved avrdude.conf.in change for UART to separate patch 2011-02-03 21:55:00 -03:00
Werner Almesberger
5b7cc3edb6 ubb/cam: CAM process for cutting the PCB, now with parametrized "mkmk" 2011-02-02 21:42:37 -03:00