Networking and Communications
Hi Pals..this was the most amazing week in terms of hands-on practice with the electronics designed and produced components... Networking and Communications was discussed and illustrated in details:
The basic purpose of networking and making devices communicate is so as to enable Locating, Parallelism, MOdularity, Interference and so on..
Various means of Networking and Communication we covered in components and devices include:
Serial>>
Asynchronous:-In almost all cases, asynchronous communication is transmission of data, generally without the use of an external clock signal, where data can be transmitted intermittently rather than in a steady stream. Any timing required
to recover data from the communication symbols is encoded within the symbols.
I2C(I squared C):-this is usually a multi-slave multi-master which typically is used in attaching lower speed peripheral ICs to processors and Microcontrollers...several examples have been clearly shown in the week`s coverage.
SPI(serial peripheral interface)which basically is an interface used in short distance communication, mostly in embedded systems in our case Sensors...SPI mostly communicate in full duplex mode using a master-slave architecture with a single master which generates reading and writing.
USB(Universal Serial Bus)..This is the most common and utilzed mode of communication..basically supports data transfer rates of 12mbs sometimes can support upto over 100 peripheral devices.
OSI Layers(Open System Interconnections)>>
Basically a conceptual model that defines a networking framework to implement protocols;
Layer 1(Physical):This layer conveys the bit stream - electrical impulse, light or radio signal..through the network at the electrical and mechanical level.It provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects. Fast Ethernet, RS232, and ATM are protocols with physical layer components.
Layer 2(Data LInk):At this layer, data packets are encoded and decoded into bits.
Layer 3(Network):This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node.
Layer 4(Transport):This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer.
Layer 5(Session):This layer establishes, manages and terminates connections between applications.
Layer 6(Presentation):This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa.
Layer 7(Application):This layer supports application and end-user processes.
Physical Media >>
This media explains itself as it relies on physical channels so as to transmit signals etc..
Capacity...heavily based on the Bandwidth communication..
Wired..comprises of Single-ended, differential, power-line, Open-Collector, open drain, tri-state, Transmission line, Waveguide etc
Wireless... We covered Radio Frequency(RF) and Bluetooth.
Also Optical and Acoustics Modes were covered extensively.
modulation >>
Basically entails varying one or more properties of a periodic waveform, called the carrier signal, with a modulating signal that typically contains information to be transmitted.
PCM: Pulse-Code Modulation
PPM: Pulse-Position Modulation
OOK: On-Off Keying
FSK: Frequency-Shift Keying
BPSK: Binary Phase-Shift Keying
QAM: Quadrature Amplitude Modulation
OFDM: Orthogonal Frequency-Division Multiplexing
FHSS: Frequency-Hopping Spread Spectrum
DSSS: Direct-Sequence Spread Spectrum
UWB: Ultra-WideBand
channel sharing >>
ALOHA
Master-Slave
Token Ring
TDMA: Time-Division Multiple Access
FDMA: Frequency-Divsion Multiple Access
CSMA: Carrier-Sense Multiple Access
CD: Collision Detection
CA: Collision Avoidance
1-persistent: transmit when clear
nonpersistent: random backoff
p-persistent: probability to transmit
CDMA: Code-Division Multiple Access
MIMO: Multiple-Input Multiple-Output
"PDMA": Physical-Division Multiple Access
ASSIGNMENT
Alright now this week`s assignment involved building and designing a wired & or wireless network connecting atleast two processors..Personally I chose to use the tutorial of WEEK 15-2014 Fab Academy AS220: Check Out Tutorial
Ok since I had not worked with such a task before I settled on meeting the basic requirements so I decided to try making the Hello Serial Bus this week.Luckily all the guidance was provided so, I downloaded the original traces which were in PNG format.
the boards from here and engraved the raw copper board by
using CNC router with conical mill. I made one bridge and two node boards.
The Bridge and node traces I used gimp and eagle via the importpng command to convert the traces into a schematic....I imported as I created a new library to use and called it hello...I had a problem though because the eagle version I was
using didn`t have inbuilt ATTiny microcontrollers so I had the task of hustling up the web for attiny44/88 library...I went ahead to produce a PCB and fabricated the boards..the original traces look like this..
hello.12C.45.Bridge.....hello.12C.45.node
The components I was going to use were pretty easy to find due to the availability in lab...they were cleary shown as such:
...
I realised gurus can quickly tell the components shown but nevertheless I`ll just go ahead and state them:
Bridge
1 attiny 45/13
1 led SMD
1 resistor of 1k ohms
1 resistor of 10kohms
1 capacitor of 1 microFarads
1 5 pin header
1 6 pin header
1 4 pin header
Nodes
1 attiny 45/13
1 led SMD
1 resistor of 1k ohms
1 resistor of 10kohms
1 capacitor of 1 microFarads
1 6 pin header
The boards after connecting looked as such...
What followed is to download the files to be burnt into the boards,,of which the files I acquired from the same source as the boards and little modifications,,As such after opening with Atmel Studio I realised they were in C my
long lost pal so I quickly adjusted each component for purposes of defining each node identification(id)..
As usual the library function #include or rather #define was present hence meaning it`s the one we`re adjusting...Its wise to note that systematic labeling will save you and processing time so i went with "0", "1" and "2" to represent bridge, node1 and node2.
As such:
#define node_id '0'
#define node_id '1'
#define node_id '2'
Once again the FabIsp came into play...unluckily mine had jammed due to unwanted shots so I used partly MKII avrsp and partly fabisp of ruto which was fine at the moment....so I went ahead and connected the nodes to the bridge and the bridge to the fabisp/MKII AVRSP..
Furthermore I had to edit the makefile as below so as to adjust crystal value provided since I intended to use 10mhz and only 8mhz and 16mhz were provided...
The original makefile is as below:
PROJECT=hello.bus.45
SOURCES=$(PROJECT).c
MMCU=attiny45
F_CPU = 10000000
(hey check this out...I changed from the usual 8000000(8mhz) to 10000000(10mhz)
CFLAGS=-mmcu=$(MMCU) -Wall -Os -DF_CPU=$(F_CPU)
$(PROJECT).hex: $(PROJECT).out
avr-objcopy -O ihex $(PROJECT).out $(PROJECT).c.hex;\
avr-size --mcu=$(MMCU) --format=avr $(PROJECT).out
$(PROJECT).out: $(SOURCES)
avr-gcc $(CFLAGS) -I./ -o $(PROJECT).out $(SOURCES)
program-bsd: $(PROJECT).hex
avrdude -p t45 -c bsd -U flash:w:$(PROJECT).c.hex
program-dasa: $(PROJECT).hex
avrdude -p t45 -P /dev/ttyUSB0 -c dasa -U flash:w:$(PROJECT).c.hex
program-avrisp2: $(PROJECT).hex
avrdude -p t45 -P usb -c avrisp2 -U flash:w:$(PROJECT).c.hex
program-usbtiny: $(PROJECT).hex
avrdude -p t45 -P usb -c usbtiny -U flash:w:$(PROJECT).c.hex
program-dragon: $(PROJECT).hex
avrdude -p t45 -P usb -c dragon_isp -U flash:w:$(PROJECT).c.hex