Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Explain how you can extend the SCI capability to RF and Bluetooth communication.

ID: 3549325 • Letter: E

Question

Explain how you can extend the SCI capability to RF and Bluetooth communication.

Imagine an RFID device connected to SCI0 that sends a 16 character code to the DB-12 board when an item is swiped
This code must then be sent to a Bluetooth device that is connected to SCI1 of the DB-12 board

Describe the connections and write the code.


this is what I came up with;


#include <hidef.h> /* common defines and macros */
#include <mc9s12dg256.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg256b"

#include "main_asm.h" /* interface to the assembly module */

void main ();
{
char c;
void getcard_id();

PLL_init(); //clock
SCI0_init(9600); //initialize SCI0 at 9600 baud
SCI1_init(9600); //initialize SCI1 at 9600 baud

while(1){
c = inchar0(c);
getcard_id(c); // Function to get RFID card no. from SCI0
outchar1(c);
}
}

As far as describing what is happening, the RFID data (16 bytes) is received at the SCI0 pin PS0, sent from the recieve shift register to the recieve data register, to the transmit data register and the transmit shift register then out to the bluetooth via SCI1 pin PS0.
Am i pretty far off?



Explanation / Answer

#include <hidef.h> /* common defines and macros */
#include <mc9s12dg256.h> /* derivative information */
#pragma LINK_INFO DERIVATIVE "mc9s12dg256b"

#include "main_asm.h" /* interface to the assembly module */

void main ();
{
char c;
void getcard_id();

PLL_init(); //clock
SCI0_init(9600); //initialize SCI0 at 9600 baud
SCI1_init(9600); //initialize SCI1 at 9600 baud

while(1){
c = inchar0(c);
getcard_id(c); // Function to get RFID card no. from SCI0
outchar1(c);
}
}

in this program Check if the UUID you are using is correct and should be the same at the Clinet and the Server sides.

Ensure that on the RF reader side it is waiting for incoming connection ? i.e there is an equivalent of the listenUsingInsecureRfcommWithServiceRecord().So, for the RF reader also has a UUID which has to be used in android app ? How should we check if the RF reader is waiting for connection

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote