Find Jobs
Hire Freelancers

microcontroller programming in mplabs

$10-60 USD

Selesai
Disiarkan lebih dari 3 tahun yang lalu

$10-60 USD

Dibayar semasa penghantaran
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
ID Projek: 28093804

Tentang projek

2 cadangan
Projek jarak jauh
Aktif 4 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
Dianugerahkan kepada:
Avatar Pengguna
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 dalam 6 hari
5.0 (1 ulasan)
1.6
1.6
2 pekerja bebas membida secara purata $150 USD untuk pekerjaan ini
Avatar Pengguna
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 dalam 7 hari
4.7 (3 ulasan)
3.5
3.5

Tentang klien

Bendera UNITED STATES
Lynn, United States
5.0
3
Kaedah pembayaran disahkan
Ahli sejak Nov 9, 2020

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.