1 Neutron Monitor Workshop 3(B): Next Generation Readout Board Mahidol University January 6, 2010 Paul Evenson University of Delaware Bartol Research Institute.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

Digital Computer Fundamentals
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
INPUT-OUTPUT ORGANIZATION
Input/Output Organization Asynchronous Bus
ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Serial I/O - Programmable Communication Interface
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Serial Peripheral Interface (SPI)
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Input/Output and Communication
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
1 Neutron Monitor Workshop 3(A): Microcontroller Principles and the Demo Board Mahidol University January 5, 2010 Paul Evenson University of Delaware Bartol.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
INPUT-OUTPUT ORGANIZATION
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Computer Architecture Lecture 08 Fasih ur Rehman.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
4.0 rtos implementation part II
SC200x Peripherals Broadband Entertainment Division DTV Source Applications July 2001.
Input/Output mechanisms
AT91 Embedded Peripherals
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
1 Workshop 4 (A): Telemetry and Data Acquisition Mahidol University June 13, 2008 Paul Evenson University of Delaware Bartol Research Institute.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
8279 KEYBOARD AND DISPLAY INTERFACING
Universal Asynchronous Receiver/Transmitter (UART)
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
8279 KEYBOARD AND DISPLAY INTERFACING
Unit 1 Lecture 4.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
1 Neutron Monitor Workshop 2(B): Neutron Monitor Digital Electronics Mahidol University June 26, 2009 Paul Evenson University of Delaware Cosray at McMurdo.
Lecture Overview Shift Register Buffering Direct Memory Access.
1 Neutron Monitor Workshop 2(A): Principles of Digital Logic Mahidol University June 25, 2009 Paul Evenson University of Delaware Bartol Research Institute.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
Serial Communication RS-232. In order to make two devices communicate, whether they are desktop computers, microcontrollers, or any other form of integrated.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
1 Neutron Monitor Workshop 2(A): Principles of Digital Logic Mahidol University July 22, 2011 Presentation developed by: Paul Evenson University of Delaware.
Chapter 6 Input/Output Organization
Serial mode of data transfer
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Input/Output and Communication
Chapter 11: Inter-Integrated Circuit (I2C) Interface
Serial I/O and Data Communication.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
Computer Organization and Design
Introduction to Microprocessors and Microcontrollers
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Serial Communications
Presentation transcript:

1 Neutron Monitor Workshop 3(B): Next Generation Readout Board Mahidol University January 6, 2010 Paul Evenson University of Delaware Bartol Research Institute

2 Workshop Series Idea Introduce students to technical aspects of neutron monitor operation Rotating workshop series that will repeat every two years at a two per year rate Independent enough so students can join at any point Accommodate wide skill range with an emphasis on “hands on” experience and individual discussion

3 Workshop Series Plan 1.Detector operation A.Detector Physics and Analog Electronics B.Art and Science of Soldering 2.Digital Circuits A.Principles of Digital Logic B.Neutron Monitor Digital Electronics 3.Microcontrollers A.Principles and the Demo Board B.Next Generation Readout Board 4.Real time data acquisition A.Principles of Telemetry and Data Acquisition B.Data Conversion and Manipulation with Visual Basic

4 Plan For Today Lecture with Demonstrations –Questions and answers Describe Design Problem –Questions and answers Individual work on design problem –Only one DEMO908 system here

5 Why Focus on the Readout Board? There are many microcontrollers in the system so focus on one Logical choice might be the Remote –Remote 616 is actually most complex –Connection to physics is closest –David really wants a “700” version New readout board easier to program –More modern microcontroller –Reprogrammable on the board

6 System Overview

7 Remote units continuously –Count neutrons –Collect a sample of pulseheights –Calculate time delays between events Once per second the GPS sends a pulse to the master boards Masters send a “sync” command to the remotes Remotes format data as of the time of the sync and resume taking data Masters request and collect data from the remotes Readout board requests and collects data from the Masters, the Counter Board, and the GPS board Readout board records data locally and also transmits to computer Computer can ask for playback of recorded data

8 Readout Board Schematic: Flash Memory, Two Microcontrollers, and Interfaces

9 Data Flow (Processor) A discovers that a board has data available A captures the data in its RAM A “B64 encodes” data and puts in FIFO1 B retrieves data from FIFO1 B writes data to flash memory B puts data into FIFO2 A sends data from FIFO2 to computer

10 Aside: B64 Encoding Binary data present difficulties in handling and storage Primarily, one cannot have delimiters, because any bit pattern is allowed Chop up three bytes into four groups of six bytes Represent each group by a printing ASCII character Less efficient use of storage but now a whole range of formatting characters and delimiters are possible

11 Why this convoluted scheme? (Processor) A discovers that a board has data available A captures the data in its RAM A “B64 encodes” data and puts in FIFO1 B retrieves data from FIFO1 B writes data to flash memory B puts data into FIFO2 A sends data from FIFO2 to computer

12 Some Answers No solution is perfect Limited resources on each controller Read/Write Memory 2kB –Use external FIFO I/O Ports – one SCI and one SPI –SCI (asynchronous) for computer –SPI (synchronous) for flash memory and for the other boards in the card cage

13 First In First Out (FIFO) Memory The FIFO allows a data source and a data user to operate asynchronously This device stores up to bit “words” with minimal control overhead There is no addressing – the words are read out in the order in which they are put in – “First In – First Out”

14 FIFO Inputs and Outputs Inputs –Data lines D0 … D8 –Write strobe (-W) –Read strobe (-R) –Master Reset (-MR) –Grouping (-RT, -XI) Outputs –Data lines Q0 … Q8 –Empty (-EF) –Half Full (-HF) –Full (-FF)

15 Synchronous Transmission Explicitly clocked data Simple and fast No need for accurate frequency Needs at least two “wires” Shift registers and common clock

16 Asynchronous Transmission Computer COM Ports Use RS 232 Protocol [Known data width, 8bits] with NRZ encoding The stop bit is used to bring [or insure] the signal rests at a logic high following the end of the frame Must have some framing gaps Still need internal patterns for synchronization of character strings For strict ASCII data, and/or are typical Complicated logic to retrieve clock from data

17 SPI Communication During an SPI transmission, data are simultaneously transmitted (shifted out serially) and received (shifted in serially). Serial clock synchronizes shifting and sampling on the two serial data lines. “Slave select” line allows selection of an individual slave SPI device; slave devices that are not selected do not interfere with SPI bus activities. On a master SPI device, the slave select line can optionally be used to indicate multiple-master bus contention.

18 The SPI is Simple, Really? Only a master SPI module can initiate transmissions. Software begins the transmission from a master SPI module by writing to the transmit data register. If the shift register is empty, the byte immediately transfers to the shift register, setting the SPI transmitter empty bit, SPTE. The byte begins shifting out on the MOSI pin under the control of the serial clock. (See Figure 13-3.) SPR1 and SPR0 bits control the baud rate generator and determine the speed of the shift register. (See SPI Status and Control Register.) Through the SPSCK pin, the baud rate generator of the master also controls the shift register of the slave peripheral. As the byte shifts out on the MOSI pin of the master, anotherr byte shifts in from the slave on the master’s MISO pin. The transmission ends when the receiver full bit, SPRF, becomes set. At the same time that SPRF becomes set, the byte from the slave transfers to the receive data register. In normal operation, SPRF signals the end of a transmission. Software clears SPRF by reading the SPI status and control register with SPRF set and then reading the SPI data register. Writing to the SPI data register clears the SPTE bit.

19 Readout Board Complication The SPI is almost compatible with our (historical) method of reading the other boards. It is like standard SPI but not quite Our “load” is not implicit in the start of the clock, but is a separate line The clocking phase is wrong This circuit translates the “Processor A” SPI convention to our convention

20 Memory Card Complication SPI signals are completely compatible with the flash card operating as a slave Flash card runs at 3.3 volts so level shifters are needed

21 SCI (Interface to Computer) Receiver and Transmitter are separate devices The receiver is more complicated because it must figure out all of the timing

22 Communication with Computer Because you never know when input will come in you must keep checking Output is simpler

23 Demonstration: Fix Micromonitor “Bug”

24 Design Problem: Is this really the best way to do B64 encoding?