logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
StatAnalytica ExpertPolitical science
(5/5)

657 Answers

Hire Me
expert
Vedparkash GuptaAccounting
(5/5)

618 Answers

Hire Me
expert
Rahul KapoorTechnical writing
(5/5)

641 Answers

Hire Me
expert
Douglas CowleyyPsychology
(5/5)

743 Answers

Hire Me
Assembly Programming

this assignment is to implement the Collatz sequence explorer we implemented an algorithm which computes each value in the sequence

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Overview

The goal of this assignment is to implement the Collatz sequence explorer. We have already seen the Collatz sequence in Assignment 1, where we counted the number of elements in the sequence. To do this, we implemented an algorithm which computes each value in the sequence and counts how many there are. For this assignment, in addition to counting them, you are also expected to output each value and its position (or count) in the sequence on the liquid crystal display (LCD).

The initial starting value for the sequence will be obtained from the user via the buttons on the LCD Shield (as described in Specifications below). Upon user confirmation, the device should display the initial value, whatever it is, and its count of 0 at the designated locations on LCD. After a short time-delay, the device will advance to the next value and display its corresponding count of

  1. The value and its count will continue advancing with a predetermined time- delay between them until the value reaches 1, at which point the last value and its count will remain on the screen until the user selects another value. The time-delay period will be chosen by the user, as described in Specifications below.

While the Collatz sequence is advancing on the screen, the user should be able to continue to interact with the input prompt using the LCD shield buttons. At any time, when the user changes the speed setting, the time-delay should be adjusted accordingly and immediately. Similarly, when the user changes the starting value and confirms the selection, immediately upon confirmation, the sequence display will update with the new starting value and start advancing from there.

This assignment is composed of several sub-problems that can be completed and tested separately before combining them into the final solution. This assignment builds on the previous assignments and labs. You are welcome to use your own previously written code or the solutions provided to you on conneX during     this course. If you use any of the solutions from conneX, you should reference them appropriately in the comments. For example, if you copied and modified the init to string function from Lab 7, then you could say: ”This function is a modified version of the function int to string from Lab 7, CSC 230, Fall 2019” in the comments.

Specifications

•  Program start:

When the device starts, or when the reset button is pressed, the LCD  screen should display your first and last name and the phrase ”CSC 230 - Fall 2019” for a period of 1 second. Then, the screen should change to the same as shown in the picture below. The cursor should be set to the least significant digit of the initial Collatz value (“n=”). The speed should be initialized at 0. The initial Collatz sequence value should be initialized at  0, and its count should be initialized at 0.

• The LCD screen layout:

 

 

n

=

0

0

0

*

 

 

 

S

P

D

:

0

 

c

n

t

:

 

 

0

 

v

:

 

 

 

 

 

0

The input fields are highlighted using boldface.

 

  • Top row is designated for prompting the user for the

    • The first three digits (initialized as zeroes), which are next to the ”n=”, are designated for inputting the new starting value of the Collatz sequence to be These digits are updated one at a time when the cursor is on each of them and the user presses UP or DOWN buttons on the LCD shield. For example, if the cursor is on the first of the three digits and that digit is currently showing as ”5”, pressing UP will change it to ”6”. This initial starting value could range between 0 and 999.

    • The asterisk (*) is for confirming the starting value for the new

Collatz sequence. When the cursor is on the asterisk and the user presses UP or DOWN, the current value and its count will be updated immediately to the new value and its initial new count of zero. Then it will continue advancing (or not) according to the current speed setting.

  • The last digit (also initialized as zero), which is next to the ”SPD:” is for controlling the amount of time to wait before

advancing to the next value in the given Collatz sequence. This speed digit is updated when the cursor is on it and the user presses UP or DOWN in a similar fashion as the first three digits described above. This speed value could range between 0 and 9.

 

  • Bottom row is designated for displaying the current value and its count in the given Collatz

    • The numbers are periodically updated to the next value and its count based on a user-determined time-delay

  • The time-delay between advances to the next value is deter- mined by speed value, which is displayed in the first row of the LCD screen and explained further

  • The maximum possible count could be 3 decimal digits long

and the maximum possible value could be 6 decimal digits long, hence the corresponding space provided between “0” and “:” on the second row in the picture above.

Suggestion: Store two strings of length 171 in memory and periodically update the LCD with those strings (lcd puts function). To change the message being displayed, update these strings (e.g. via ISR), and not the LCD, as it will get updated as per previous sentence.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme