Find Jobs
Hire Freelancers

microcontroller programming in mplabs

$10-60 USD

Đã hoàn thành
Đã đăng vào hơn 3 năm trước

$10-60 USD

Thanh toán khi bàn giao
write a program that uses the on-board switches (pic32mm curiosity development board) to control LED1 and LED2 as described below: • Initially, both LEDs blink simultaneously, changing approximately every ½ second. • Pressing S1 at any point should toggle whether the LEDs are blinking. Pressing the switch the first time pauses blinking; pressing it again restarts blinking. o When paused, one or both LEDs may be off, depending on the mode of operation described below. • Pressing S2 should change between four modes of operation, which are: 1. LEDs blinking simultaneously 2. LEDs alternating—when one is on, the other is off 3. Only LED1 blinking, with LED2 paused (either on or off) 4. Only LED2 blinking, with LED1 paused (either on or off) Repeated presses of S2 should cycle between the modes in the order above (1, 2, 3, then 4). After leaving mode 4, the program should return to mode 1. the code so for as follow: #include main: sw zero, TRISA ## TRISA = 0 --> all PORTA bits = output sw zero, ANSELA ## ANSELA = 0 --> all PORTA bits digital sw zero, TRISC ## TRISC = 0 --> all PORTC bits = output sw zero, ANSELC ## ANSELC = 0 --> all PORTC bits digital li t0, _PORTA_RA0_MASK ## t0 = 0x00000001 --> control LED1 li t2, _PORTC_RC9_MASK ## t1 = 0x00000200 --> control LED2 li t4, _PORTB_RB7_MASK ## t4 = 0x00000080 --> saved state of S1 li t6, _PORTB_RB13_MASK ## t6 = 0x00002000 --> saved state of S2 sw t0, LATASET sw t2, LATCSET toggle: li t1, 0x003FFFFF ## Set delay counter ## Toggles LED about every 1.5 seconds d1: addi t1, t1, -1 ## Decrement counter bne t1, zero, d1 ## and continue doing that until we hit 0 nop sw t0, LATAINV sw t2, LATCINV j toggle ## Reset delay counter and start again nop
Mã dự án: 28093804

Về dự án

2 đề xuất
Dự án từ xa
Hoạt động 3 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
I am experienced Embedded System Developer. I made a lots of projects on PIC microcontroller. I can make your project with C language.
$49 USD trong 6 ngày
5,0 (1 nhận xét)
1,6
1,6
2 freelancer chào giá trung bình $150 USD cho công việc này
Avatar người dùng
Hi! I am an Electronic engineer, microcontroller, C programming expert having past experiences with arduino, pic, AVR, chipkit and Texas instruments microcontrollers I am waiting for you over the chat. Thank you!
$250 USD trong 7 ngày
4,7 (3 nhận xét)
3,5
3,5

Về khách hàng

Cờ của UNITED STATES
Lynn, United States
5,0
3
Phương thức thanh toán đã xác thực
Thành viên từ thg 11 9, 2020

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.