Open-Source Robotics And Proces Control Cookbook Edwards L 242P Newnes Elsevier 2005 Part 7

Tham khảo tài liệu 'open-source robotics and proces control cookbook edwards l 242p newnes elsevier 2005 part 7', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 3 sc_calc andi r18 07 mask off high bit of column Shift left R1 times to get the desired column latch byte ldi r17 01 sc_c_lp cpi r18 0 breq sc_c_done lsl r17 dec r18 rjmp sc_c_lp sc_c_done out PORTA r17 put latch byte on PORTA nop nop out PORTB r20 nop nop andi r20 C0 out PORTB r20 Increment column column_done lds r18 currentline inc r18 andi r18 0F sts currentline r18 Have we wrapped around to column 0 cpi r18 00 brne rfsh_cont Yes Reset pointer and update blink count ldi r26 low framedata ldi r27 high framedata lds r18 framecounter inc r18 See if we ve had a blink overflow cpi r18 BLINK_RATE brne blink_ok lds r18 flags ldi r19 1 FLAG_BLINK eor r18 r19 sts flags r18 108 Some Example Sensor Actuator and Control Applications and Circuits Hard Tasks Idi r18 00 blink_ok sts framecounter r18 rfsh_cont store new frame pointer sts frameptr_lo r26 sts frameptr_hi r27 Force 80 into timer register to double frame-rate ldi r18 80 out TCNT0 r18 out SREG r0 pop r0 pop r16 pop r17 pop r18 pop r19 pop r20 pop r21 pop r26 pop r27 reti This is the only project here that includes significant functionality in the main loop. This loop polls the test-mode bit and when it is set by the serial ISR the main loop calls the test-mode function. Test mode is provided mainly so the user can verify that all LEDs are wired and functioning correctly. In test mode each entire column is illuminated sequentially 0-15 then each entire row is illuminated sequentially A-Z . Any miswired or shorted row column lines will become immediately apparent. Main program loop. Most of the functionality is actually in ISRs. mainloop lds r16 flags sbrs r16 FLAG_TESTMODE rjmp ml_nottest call testmode call clearscreen 109 Chapter 3 ml_nottest rjmp mainloop f Test mode f Destroys R16 R19 R26 R27 testmode f PHASE 1 f Walk a line of FFs across the 16 columns call clearscreen ldi r18 10 f Point X at start of framebuffer data ldi r2 6 low framedata ldi r27 high framedata ldi r2 0 FF ldi r21 C0 w_f_0 lds r16 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
109    358    1    29-06-2024
48    88    2    29-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.