009
THINKLA
ABS
UNIBOARDV
O
V1.1USERGUIDE
U
Liccensedb
by:
Openplatform
mforEmbeddedandRealTimeSyystemsP
Programm
ming |
TR
RITechno
osolution
nsPvt.Lttd.
ThinkLABS
TableofContents
Introduction............................................................................................................................................................5
PackageContents....................................................................................................................................................6
TestingtheBoard....................................................................................................................................................7
TestingtheBoardonWindowsOS...............................................................................................................................7
TestingtheBoardonLinuxOS....................................................................................................................................11
WhatyouneedforprogrammingtheBoard..........................................................................................................12
Hardwarerequirements..............................................................................................................................................12
Softwarerequirements...............................................................................................................................................12
Safetyandprecautionstobetaken............................................................................................................................12
Prerequisites..............................................................................................................................................................12
HardwareConnections..........................................................................................................................................13
Features................................................................................................................................................................14
BoardFeatures............................................................................................................................................................14
ControllerFeatures.....................................................................................................................................................15
SettinguptheBoardconfiguration........................................................................................................................16
BoardDescription.......................................................................................................................................................16
Atmega128controller.............................................................................................................................................16
Atmega8controllerwiththefirmwareforprogrammingthroughUSB.................................................................16
I2CandRTC(DS1307)withBackupBattery............................................................................................................16
Analogsensors(JoystickandLDR)..........................................................................................................................16
Buzzer......................................................................................................................................................................16
OnboardMotorDriver............................................................................................................................................16
Externalpower........................................................................................................................................................17
TestLEDs.................................................................................................................................................................17
TwoUART's.............................................................................................................................................................17
LCD..........................................................................................................................................................................17
PushButtons...........................................................................................................................................................17
SelectionSwitches..................................................................................................................................................17
GeneralPurposePORTS..........................................................................................................................................18
JumperSettings...........................................................................................................................................................19
TRITechnosolutionsPvtLtdPage2of129http://thinklabs.in
ThinkLABS
SoftwareInstallations...........................................................................................................................................22
SoftwareInstallationsforLinuxOS.............................................................................................................................22
TextEditor(GeditEditor)........................................................................................................................................22
InstallingGeditEditor:............................................................................................................................................22
GeditEditorPlugin(EmbeddedTerminal):............................................................................................................24
Compiler(avrgcc)...................................................................................................................................................29
avrlibc(StandardClibraryforAtmelAVRdevelopment):....................................................................................31
avrdude(softwareforprogrammingAtmelAVRmicrocontrollers):......................................................................33
Serialportterminal(Gtkterm)................................................................................................................................34
GtktermConfigurationsforsettingtheBaudrate,Parity,Stopbits......................................................................37
SoftwareInstallationsforWindowsOS......................................................................................................................39
WinAVR(Includesavrgcc,avrbinutils,avrdude)...................................................................................................39
InstallingUSBdriversforuNiBoard.........................................................................................................................44
ProgrammingtheBoard........................................................................................................................................48
GettingStartedonLinux.............................................................................................................................................48
GettingStartedonWindows......................................................................................................................................62
TextEditor(programmersNotepad).....................................................................................................................63
CompilethecodeandprogramtheboardonWindows(CommandPrompt).......................................................67
Usinghyperterminalofwindows...........................................................................................................................75
GettingStartedwithRTOS(uC/OSII)onWindowsOS...........................................................................................79
uC/OSIIHardwareandSoftwareArchitecture...........................................................................................................79
Code,CompileandprogramtheRTOS(uC/OSII)programsonLinuxOS..................................................................80
Code,CompileandprogramtheRTOS(uC/OSII)programsonWindowsOS............................................................89
Troubleshooting..................................................................................................................................................112
Makeutility...............................................................................................................................................................112
LEDs...........................................................................................................................................................................112
UART..........................................................................................................................................................................112
LCD............................................................................................................................................................................112
Joystick......................................................................................................................................................................112
LDR............................................................................................................................................................................113
ExternalInterrupts....................................................................................................................................................113
RTC............................................................................................................................................................................113
SPI..............................................................................................................................................................................113
TRITechnosolutionsPvtLtdPage3of129http://thinklabs.in
ThinkLABS
Motordrivers............................................................................................................................................................113
WhatyoucandowiththeuNiBoard....................................................................................................................114
Addons..............................................................................................................................................................118
SD/MMCcardInterface........................................................................................................................................118
EthernetInterface.................................................................................................................................................118
uNiBoardv1.1Schematic....................................................................................................................................119
Controllersection:ATmega128pinconnections......................................................................................................119
Buzzersection...........................................................................................................................................................120
Joystickandconnectorssection................................................................................................................................120
LCDsection................................................................................................................................................................121
LDRsection................................................................................................................................................................121
LEDssection..............................................................................................................................................................121
MotorDriversection.................................................................................................................................................122
Powersupplysection................................................................................................................................................122
RTCsection................................................................................................................................................................122
Sensorportsection...................................................................................................................................................123
Switchessection........................................................................................................................................................123
UARTsection.............................................................................................................................................................123
USBprogrammersection(Courtesy:http://www.fischl.de/usbasp/)......................................................................124
Licensingterms...................................................................................................................................................125
BillofMaterials(BOM):.......................................................................................................................................126
AppendixAReferences.....................................................................................................................................128
AppendixBServicesandSupport......................................................................................................................129
TRITechnosolutionsPvtLtdPage4of129http://thinklabs.in
ThinkLABS
Introduction
TheuNiBoardversion1.1isanidealopensourcedevelopmentplatformforEmbeddedandReal
TimeSystemsProgramming.PoweredbyaRISCmachine(ATMega128)thatprovidesathroughput
of16MIPSandupto128KBofinternalstorage(flash),theboardwouldbesuitableforanysortof
embeddedapplicationdevelopment.
Onboard peripherals like Joystick along with the communication ports (RS232) and the Gtkterm
driver (hyperterminal for Windows) make the board apt for basic game development in an
Embedded (nonOS) as well as OS based environment. RT Kernels with small footprint (uC/OSII,
FreeRTOS,nutOS)canbeportedontheboardtogainhandsonexperienceofRealtimeapplication
design.
TheboardispoweredbytheUSBport.TheboardisalsoprogrammablethroughUSBportthereby
makingitcompletestandalonelabequipmentneedingnothingapartfromabasicPC/laptoptoget
startedwiththedevelopmentprocess.Theopeninterface(openLEDinterface,openports)extend
the platforms role for prototyping applications like external device/sensor interfacing. The
controller by itself supports protocols like SPI, I2C (onboard I2C based RTC), UART (dual
programmableUART)whichcanbeusedformultiboardcommunication.
Additionally,theboardalsofeaturesanonboardmotordriverwhichallowstocontroluptotwo
DC motors bidirectionally. External supply, if required for the motors can be provided with
appropriatehardwareconfigurationsettings.
The board along with its contentrich user manual is a perfect companion to have for
hobbyists/aspirants seeking a career in Embedded software design, since it can accommodate
preliminary applications like port control or sensor data processing built on Embedded C to
complexrealtimeapplicationsbuiltonRTOSlikeDAS(DataAcquisitionSystems),embeddedweb
server,FATFSforembeddedsystemsandmore.
We plan to adhere to the Creative Commons license (Refer licensing terms), which has the
philosophyofShare,Remix,ReuseLegally.Itmeansthatanyoneisallowedtoproducecopies
oftheboard,toredesignit,oreventosellboardsthatcopythedesign.Youdontneedtopaya
licensefeetotheThinkLABSteamorevenaskpermission.However,ifyourepublishthereference
design, you have to credit the original group. And if you tweak or change the board, your new
designmustusethesameorasimilarCreativeCommonslicensetoensurethatnewversionsofthe
boardwillbeequallyfreeandopen.
TRITechnosolutionsPvtLtdPage5of129http://thinklabs.in
ThinkLABS
PackageContents
TheuNiBoarddevelopmentplatformwiththeperipheralslistedbelow
uNiBoarddevelopmentboard1unit
16x2LCD1unit
Serialcable(DB9)1unit
USBcable1unit
FRCconnectorcables2units
CDconsistingofuNiBoardusermanual(basedonLinux(Ubuntu)/Windows),essentialsoftware
packagesandsamplecodes(RTOS/nonOSapplications)1unit
Pouchforstorage1unit
TRITechnosolutionsPvtLtdPage6of129http://thinklabs.in
ThinkLABS
TestingtheBoard
Thissectionliststheproceduretotesttheboard.ToenableyoutoquicklytesttheBoard,itcomeswitha
testprogramloaded.So,makesureyoufirsttesttheboardbeforeanyprogramming.
Ifyouhaveprogrammedthecontrollertherebyerasingthetestprogramfromtheflashorincaseyoufind
thatthesampleprogramhasnotbeenloaded(whichwouldbeararecase)thenyouneedtoloadthetest
programontotheboard(refertothesectionProgrammingtheBoard).ThetestprogramisprovidedonCD
uNiBoard Contents directory (inside sample codes). This code tests the boards peripherals (LCD, UART,
LEDs,Buzzer,andJoystick).
TestingtheBoardonWindowsOS
FollowthestepstoconfirmiftheuNiBoardisOK.
STEP1:ConnecttheLCDontheBoard(refertosectionHardwareconnections).
STEP2:UseFRCcabletoconnectopenLEDportandPortC.
STEP3:UsingtheserialcableconnectuNiBoardtothePC.
STEP4:IfyouareusingWindowsOSthenyouneedinstalltheUSBdriversfortheuNiBoardonce(referto
thesectionSoftwareInstallation>>SoftwareInstallationforWindowsOS>>InstallingtheUSBdriversfor
uNiBoard).
STEP5:UsingtheUSBcableconnecttheuNiBoardtothePC.
STEP6:TurnONtheBoardoncethedriversareinstalledcorrectly.
STEP7:OpentheSerialterminalandsetthebaudrateto115200,paritytonone,andstopbitsto1.Soclick
onStart>>programs>>Programs>>Accessories>>Communications>>hyperterminalasshownbelow.
TRITechnosolutionsPvtLtdPage7of129http://thinklabs.in
ThinkLABS
STEP8:SelectFilemenu>>NewConnectionthenEnterNameforconnectionandclickOK.
STEP9:SelecttheCOMPortwhereyouhaveconnectedtheserialcable.
TRITechnosolutionsPvtLtdPage8of129http://thinklabs.in
ThinkLABS
STEP10:Selectthesettingsasgivenbelowforthistestprogram.
STEP11:SelectApplyandthenOK.
TRITechnosolutionsPvtLtdPage9of129http://thinklabs.in
ThinkLABS
STEP12:TurnONtheBoard.
STEP13:ThetestprogramthatwehaveloadeddemonstratesSNAKEgameonanyserialterminalwhichis
VT102compatible.IfeverythingiscorrectlyinstalledyoushouldbeabletoseeagameofSNAKE(modified)
aswellasplayusingtheJoystick.
WhiletheprogramisrunningyouwillalsobeabletoseetheSCOREbeingdisplayedontheLCDalongwith
theversionoftheuNiBoardthatyouarecurrentlyusing.WhiletheSNAKEeatsupfoodyouwillbeableto
hear the buzzer. Every time a new food is generated you will see the LEDs glowing thereby utilizing all
uNiBoardperipherals.
TRITechnosolutionsPvtLtdPage10of129http://thinklabs.in
ThinkLABS
TestingtheBoardonLinuxOS
FollowthestepstocheckwhetherornottheuNiBoardisworkingproperlyonLinuxOS
STEP1:Step1toStep3issameasgivenintheWindowsOSprocedure.
STEP2:TurnONtheBoard.IfyouarewonderinghowtoinstalltheUSBdrivers,youdontneedtodothatat
allsinceLinuxkernelhasthosedriversinbuilt.
STEP3:OpentheGtkterm(refertothesubsectionInstallingSoftwareforLinuxOS).
STEP4:ConfiguretheGtktermtobaudrate/speedto115200,paritytonone,andstopbitsto1(refertothe
subsectionGtktermConfigurationsforsettingtheBaudrate,Parity,Stopbits).
STEP5:TurnONtheBoard.
STEP6:Outhereaswellyoushouldbeabletodothings(likeplayingSNAKEonGtkterm)thathavebeen
listedinSTEP13.
TRITechnosolutionsPvtLtdPage11of129http://thinklabs.in
ThinkLABS
WhatyouneedforprogrammingtheBoard
Hardwarerequirements
uNiBoardversion1.1alongwithUSBcable
Serialcable(optional)
FRCCable(optional)
Softwarerequirements
TextEditor(GeditonLinux/ProgrammersNotepadonWindows)
Toolchain(avrgcc,avrbinutils,avrdude):Installationprocedureisexplainedintheupcoming
sections
Serialterminal(GtktermonLinux/hyperterminalonwindows)
Driverforusbasp(Windowsrequiresexplicitinstallation)
Safetyandprecautionstobetaken
Donotusetheexternalpowersupplymorethan15V.
BoardandSMDswitchesshouldbehandledwithcare.
Fusesettingsofthetarget(microcontroller)shouldbemodifiedonlywithappropriate
knowledge,sincelockingthefusesectionmightrendertheboarduseless.
DonotprogramtheBoardwhileyouareusingSPIlinesforcommunicationwhichmightalso
rendertheboarduseless.
Prerequisites
Beforeyoustart,youareexpectedtohavesomeknowledgeofAVRmicrocontrollersandits
softwaretoolsuptoapreliminarylevel.WehavenotdiscussedtheAVRarchitecture(Datasheet
isthebesthelponthesame.ithasbeenincludedintheCDcontents)
TheboardguidedoesnotgiveanyconceptualknowledgewithregardstoRTOS.Forbestresults,
youareexpectedtohaveareferencematerialontheRTOSthatyouaregoingtouseonthe
board.IncasethetargetRTOSisuC/OSII,youneednotlookbeyondMicroC/OSII,TheReal
TimeKernelbyMr.JeanLabrosse.
AllthesamplesexamplesbasedonRTOSincludingtheSNAKEapplicationthatyoumusthave
justseenwhiletestingtheboardutilizethesameRTOSkernel(i.e.:uC/OSII)
TRITechnosolutionsPvtLtdPage12of129http://thinklabs.in
ThinkLABS
HardwareConnections
8LEDs
RTCBackup
battery
RTC
SW4,SW3,
SW2,SW1
switchi/ps
UART0
Resetswitch
Test
LEDs
PORT
Motor2
FRC
Cable
Buzzer
beneath
Controller
Motor1
PORTC
ExtPower
Connector
USB
programmer
JTAG
PORT
USB
Port
ADC
PORT
LCD
connector
8Sensor
inputs
SerialPort
(UART1)
8GND
lines
8VCC
lines
Joystick LDR
Joystick/Ext.ADC
PORTG
switch
connector
4SPI
Lines
USBpower
LDR
switch
Jumper
Programming
Program
connectorfor
Enable/UART0
USB
Selection
programmer
Programming
switch
Jumper
TheuNiBoardversion1.1connectstothePCusingUSBport.Asshowninthefigure1.1ontheboardthereis
aserialportandUSBportconnectors.TheserialportisusedfordebuggingpurposewhileUSBportisused
forpowerandburningthehexfilesintoATmega128microcontroller.
TheUSBcable(forpower/programmingpurposes)andserialcablecanbeinterfacedwiththePC.Theserial
cableisoptionalaswearenotusingitforprogrammingthehexfileintotheAtmega128chip.ForanyUART
relatedactivitieshavingtheserialcableisamust.
TRITechnosolutionsPvtLtdPage13of129http://thinklabs.in
ThinkLABS
Features
BoardFeatures
ATmega128controllerwithexternalcrystalof16MHZ
usbasp:ATmega8basedUSBprogrammerforATmega128(opensourcefirmwarerunningon
hardwarelicensedunderGNUGPLv2fromhttp://www.fischl.de/usbasp)
I2Ccommunicationlines
SPIcommunicationlines
16x2alphanumericLCDwithcontrastadjustment
RTCwithBackupBattery
AnalogJoystickwithcentreclick
LDRsensor
Buzzer(beneaththeprocessorboard)
OnboardMotorDriver(L293D)
LEDsforUSBprogrammerreadyindicator,Programmingstatusindicator,andPowerON
indicator
TestLEDs(openforinterfacewithanyPORT)
OpeninterfacePortssuchasPORTF/ADC,PORTC
JTAGinterface(ExternalJTAGhardwarerequired)
USBPortforprogrammingtheBoard
DualprogrammableUARTs
PushButtonsforExternalInterrupts,Reset
ConfigurationSwitchesforUSBPower/Externalpower,ExternalADC/JoystickandProgram
Enable/UART0
Modulardesigntopermitreplacementofprocessorboard
TRITechnosolutionsPvtLtdPage14of129http://thinklabs.in
ThinkLABS
ControllerFeatures
ThefeaturesofAtmega128areasfollows:
AdvancedRISCArchitecture
128KBytesofInSystemSelfprogrammableFlashprogrammemory
4KBytesEEPROM
4KBytesInternalSRAM
JTAG(IEEEstd.1149.1Compliant)Interface
Two8bitTimer/CounterswithSeparateprescalerandCompareModes
TwoExpanded16bitTimer/CounterswithSeparateprescaler,CompareModeand
CaptureMode
RealTimeCounterwithSeparateOscillator
Two8bitPWMChannels
6PWMChannelswithProgrammableResolutionfrom2to16Bits
8channel,10bitADC
ByteorientedTwowireSerialInterface
DualProgrammableSerialUSARTs
Master/SlaveSPISerialInterface
ProgrammableWatchdogTimerwithOnchipOscillator
PoweronResetandProgrammableBrownoutDetection
ExternalandInternalInterruptSources
SixSleepModes:Idle,ADCNoiseReduction,Powersave,Powerdown,Standby,andExtended
Standby
SoftwareSelectableClockFrequency(usingFusebits)
53ProgrammableI/OLines
4.5V5.5VforAtmega128OperatingVoltages
64leadTQFP
TRITechnosolutionsPvtLtdPage15of129http://thinklabs.in
ThinkLABS
SettinguptheBoardconfiguration
BoardDescription
Atmega128controller
The ATmega128 is a lowpower 8bit microcontroller based on the AVR enhanced RISC architecture. The
AtmelATmega128isapowerfulmicrocontrollerthatprovidesahighlyflexibleandcosteffectivesolutionto
manyembeddedcontrolapplications.
Atmega8controllerwiththefirmwareforprogrammingthroughUSB
USBasp is a USB incircuit programmer for Atmel AVR controllers. It simply consists of an ATMega8 and a
couple of passive components. The programmer uses a firmware (USB driver) to program Atmega128
microcontroller.FormoreinformationonbuildingUSBaspreferhttp://www.fischl.de/usbasp.Itisanopen
sourcefirmwarealongwithhardwarelicensedunderGNUGPLv2.
I2CandRTC(DS1307)withBackupBattery
TheDS1307serialrealtimeclock(RTC)isalowpower,fullbinarycodeddecimal(BCD)clock/calendarplus
56 bytes of NV SRAM. Address and data are transferred serially through an I2C, bidirectional bus. The
clock/calendar provides seconds, minutes, hours, day, date, month, and year information (Compensation
Validupto2100).Nospecialhardwareconfigurationisrequiredasitismountedonourboardandinternally
connectedtotheprocessorspins.
Analogsensors(JoystickandLDR)
TheJoystick(AnalogjoystickusedinPS2consoles)isconnectedtotheADC,Xaxisonchannel1(PF1)andY
axisonchannel2(PF2)oftheAtmega128microcontroller.TheLDRsensorisconnectedtochannel0(PF0)of
theAtmega128microcontroller.
Buzzer
TheBuzzerisconnectedtoPA3oftheAtmega128microcontroller,andliesbeneaththeprocessorboard.
OnboardMotorDriver
TheMotordriverchip(L293D)isusedtodrivethemotorswhichcanbeconnectedtothePTRconnectorsas
shownintheabovefigure.Throughsoftwareyouneedtoconfigureasfollows:
PB6andPB5
(MOTOR1)
PE2andPE3
(MOTOR2)
PB4(CHIPENABLE)
Therearemotorswhichmightneedhigherthan5V(upto12V)operatingvoltage.Insuchcasesanexternal
supply can be given to the board and the USB power switch can be toggled to make the external supply
availableinsteadofaUSBpoweredconnection.
TRITechnosolutionsPvtLtdPage16of129http://thinklabs.in
ThinkLABS
Externalpower
The external power connector in the above figure can also be used for connecting rechargeable batteries
andmakingtheboardoperateonbatterypowerincaseofroboticorothersuchmobileapplications.
TestLEDs
TestLED'sarepulledupsotoglowtheLEDsweneedtomaketheparticularportpinLow.Youcanconnect
theGeneralPurposePORTtotestLEDPortusingFRCCable.
TwoUART's
UART1isusedtoconnectPCthroughtheMAX232voltageconverterchipsincepcusesRS232standardfor
serialport.UART1canbeusedfordebuggingthecodeorforanysortofinteractionwithGtkterm.
UART0isnotconnectedtoMAX232asitisleftopenforcommunicationbetweentwoBoards.
LCD
LCDforuNiBoardisusing4datalines,2controllinesandWRofLCDisconnectedtoGND.
DATALINES(PA4,PA5,PA6,PA7)
CONTROLLINES(PA0forRS,PA2forLCDEN)
PushButtons
ExternalInterrupts
SW3(INT6)
SW4(INT7)
GeneralPurposeswitch
SW1(PD6)ActiveLow
SW2(PD7)ActiveLow
ResetSW
SelectionSwitches
USBPower(Pressed)/Externalpower(Depressed)
Joystick(Pressed)/ExternalADC(Depressed)
ProgramEnable(Pressed)/UART0(Depressed)
The most important part of board configuration is the configuration switches. More often than not,
programmingerrorsorabnormalprogramresponseandexecutionareduetofaultyconfigurationof
theswitches.So,whileprogramming,orusingADC,orexternalpowersupplyorbatteryorwhileusing
UART0 make sure you have first set the configuration switches in the correct position before
concludingthatyourprogramisnotworkingortheboardisfaulty.
TRITechnosolutionsPvtLtdPage17of129http://thinklabs.in
ThinkLABS
USBPower(Pressed)/Externalpower(Depressed)
RefertotheuNiBoardfigurewherethecomponentshavebeenlabeledtounderstandwherethese
switches are physically placed on the board. While you have connected the uNiBoard cable for
programmingpurposesorforpoweringtheboardthisswitchshouldbeinthepressedposition.
Whileconnectinganyexternalpowersupplyorbattery,thisswitchshouldbeindepressedposition.
Thismakesthe7805voltageregulatorcomeintopicturetoprovide5VpowersupplyfortheICs.
Joystick(Pressed)/ExternalADC(Depressed)
While you are using the analog joystick you are using the internal ADC of the controller which is
availableatPORTF.TheLDRwhichisanotheranalogsensorisalsoconnectedatPORTF.Makesure
thatthisswitchisinpressedpositionwhilethejoystickisbeingused.
IncaseyouwanttousetheopeninterfacepinsofthePORTF,inordertoconnectexternalanalog
sensors or digital sensors (refer labeled figure of uNiBoard), change the switch position to
depressed.ThereisanotherjumpersettingwhichyouwouldneedtodoinordertotaketheLDRout
ofthecircuit.Thisconfigurationwillbediscussedwhilediscussingjumpersettings.
ProgramEnable(Pressed)/UART0(Depressed)
While programming the board this is one switch that you should never forget to press, failing which
avrdude(programmingsoftwarewillflashanerrorsayingtargetnotfound.
Once programming has been completed in order to gain access to UART0 you will need to keep the
switchinthedepressedposition,sincetheUART0pinsaremultiplexedwiththeprogrammingpins.
GeneralPurposePORTS
PORTC
PORTCisanopeninterfaceportwhichcanbeusedtoconnectanydevicesonFRCconnector.
PORTF(Joystick/LDR/Externalsensors)
PORTFcanbeusedtoconnectexternalanalogordigitalsensorsoritcanalsobeusedasJoystickorLDRADC
channels.TherearetwoconnectorsFRCconnectorandBergsensorportconnectoreitherofwhichcanbe
used to connect the external sensors. The Berg sensor port connector is compatible with our TRI sensors.
Youcanvisittowebsiteathttp://www.thinklabs.in/resources/tocheckoutTRIsensorsandyoucanbuyat
http://www.thinklabs.in/shop/.
PORTG
PORTGisanopeninterfaceportwhichcanbeusedtoconnectanydevicesonbergconnector.
PORTCandPORTF
ThePORTCandPORTF(ADC)areopenportsandcanbeconnectedtotestLEDsthroughFRCcable.Thesecan
beaccessedusing10pintheFRCconnector.
TRITechnosolutionsPvtLtdPage18of129http://thinklabs.in
ThinkLABS
ThepindiagramofAtmega128isgivenbelowalongwiththemannerinwhichwehaveutilizedtheportpins
incaseofuNiBoard:
Joystick/LDR/Ex
ternalsensors
LCDRS LCDEN
UART0
LCD
DATA
MOTOR2
PORTC
(Open
Interfaceon
FRC
connector)
SPI
lines
MOTOREN
MOTOR1
16MHz
Crystal
I2C UART1
(RTC) (Max232)
JumperSettings
Apartfromtheconfigurationswitchesdiscussedabovethejumpersettingsisanothersourceofarrivingto
wrongconclusionsprovidedthattheyhavenotbeensetcorrectly.
TherearetwojumpersontheboardoneforprogrammingorSPIjumperandotheroneforLDRorExternal
ADCselection.Asshowninthefigurebelow:
TRITechnosolutionsPvtLtdPage19of129http://thinklabs.in
ThinkLABS
Joystick/External
sensorSelection
USBPower
Selection
4SPI
Lines
LDR
Jumper
Programming
Jumper
ProgramEnable
/UART0Selection
LDRjumper
Youcanusethemasperyourapplicationrequirements.Incaseyouareconnectingexternalsensorsatthe
sensorport,youwillneedtochangethepositionoftheLDRjumpersoastodisassociateitfromthecircuit
asshownbelow:
PositionofjumperwhileusingLDRsensor
TRITechnosolutionsPvtLtdPage20of129http://thinklabs.in
ThinkLABS
WhileconnectingexternalsensorsattheopeninterfaceofPORTF,thisjumperpositionshouldbechangedto
thealternatepositionasshownbelow:
Positionofjumperusingexternalanalog
sensors
Programmingjumper:
Theprogrammingjumperhastoberetainedinthepositionshownbelowunderallcasesexceptwhenusing
theSPIcommunicationlines.
PositionofjumperwhileusingLDRsensor
WhileusingtheSPIcommunicationlinesthejumpercanbeeitherremovedorplacedintheadjoiningpins
providedwhichisNC(NoConnection),asshownbelow.Thelatterisasaferoptiontoensurethatyoudonot
misplacethejumper.
TRITechnosolutionsPvtLtdPage21of129http://thinklabs.in
ThinkLA
ABS
Softw
wareIn
nstallattions
Softw
wareInsta
allationsforLinux
xOS
Theproccedurethat wearediscu
ussingforUb
buntuLinuxinvolvesdow
wnloadingpaackagesthro
oughthesynaptic
manager.Henceyou
uneedtohaaveanintern
netconnectio
oninplaceb
beforeyoubeeginwiththiis.Ifnotgethold
bor*.rpmpaackagesofth
helistedsoftwareandinsstallitonyoursystem.
of*.deb
Thefollo
owingsectiondescribesttheinstallatiionofthesoftwarepackaagesonUbu
untuLinux.
TextE
Editor(GeeditEditor)
TheGed
dit(textedito
or)mightbeinstalledalreadyonyoursystem,sin
nceitsthedefaulttexte
editorprovided
bythed
distribution.IIfyoufindth
hatitismissingyoucanffollowthebeelowmentionedsteps.
InstalllingGedittEditor:
STEP1:Opentermin
nalandtype::sudoaptitudeinstallgeditandpressenter
STEP2:Enterrootpassword.
TRITechnosolutionsPvtLLtdPage22o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP3:Itwillshowaalistofalldeependenciessinstalledasshownbelo
ow
STEP4:PressALT+FF2andtypegeditandprressentertoopentheGeeditapplication
TRITechnosolutionsPvtLLtdPage23o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP5:TheGeditap
pplicationwiillopen
GeditEditorPlu
ugin(Em
mbeddedT
Terminal)):
TheEmb
beddedTerm
minalisaged
ditpluginwh
hichfitsaterminalintheegeditwindo
owthroughw
whichwecan
executeLinuxcomm
mands,compileprogramusingtheMA
AKEutilityan
nddownload
ditontoourrchip
NOTE:C
Closeallgeditapplication
n.
STEP1:Opentermin
nalandtype::sudoaptitudeinstallgeditpluginsandpresseenter
TRITechnosolutionsPvtLLtdPage24o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP2:Enterrootpassword.
STEP3:Itwillshowaalistofalldeependenciessinstalledasshownbelo
ow
TRITechnosolutionsPvtLLtdPage25o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP4:PressALT+FF2andtypegeditandprressentertoopentheGeeditapplication
STEP5:TheGeditap
pplicationwiillopen.
TRITechnosolutionsPvtLLtdPage26o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP6:TheningediitopenEditm
menu>prefeerencesandgotopluginsstab
STEP7:SelectEmbeeddedTermiinalandpresssclosebutto
on.
TRITechnosolutionsPvtLLtdPage27o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP8:GototheViewmenuan
ndselectBotttompane
TRITechnosolutionsPvtLLtdPage28o
of129 htttp://thinklabs.in
ThinkLA
ABS
Compiiler(avrggcc)
STEP1:Opentermin
nalandtype::sudoaptitudeinstallgccavrandpressenter
TRITechnosolutionsPvtLLtdPage29o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP2:Enterrootpassword.
STEP3:Itwillshowaalistofalldeependenciessinstallassh
hownbelow.
TRITechnosolutionsPvtLLtdPage30o
of129 htttp://thinklabs.in
ThinkLA
ABS
bc(StandaardClibrraryforAttmelAVR
Rdevelopm
ment):
avrlib
STEP1:Opentermin
nalandtype::sudoaptitudeinstallavrlibcandpressenter
TRITechnosolutionsPvtLLtdPage31o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP2:Enterrootpassword
STEP3:Itwillshowaalistofalldeependenciessinstallassh
hownbelow
TRITechnosolutionsPvtLLtdPage32o
of129 htttp://thinklabs.in
ThinkLA
ABS
avrdude(softw
wareforprrogramm
mingAtmeelAVRmiccrocontro
ollers):
STEP1:Opentermin
nalandtype::sudoaptitudeinstallavrdudeand
dpressenterr
TRITechnosolutionsPvtLLtdPage33o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP2:Enterrootpassword
STEP3:Itwillshowaalistofalldeependenciessinstallassh
hownbelow
minal(Gtk
kterm)
Serialportterm
TheGtkttermisanalo
ogoustoWin
ndowsHyperrTerminalwh
hichisusefulforserialco
ommutationsbetweenP
PC
anduNiBoard.ItisaaVT102compatibleseriaalterminal.
STEP1:Opentermin
nalandtype::sudoaptitudeinstallgtktermandpressenter
TRITechnosolutionsPvtLLtdPage34o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP2:Enterrootpassword.
STEP3:Itwillshowaalistofalldeependenciessinstalledasshownbelo
ow.
TRITechnosolutionsPvtLLtdPage35o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP4:PressALT+FF2andtypegtktermand
dpressenterrtoopentheeGtktermap
pplication
TRITechnosolutionsPvtLLtdPage36o
of129 htttp://thinklabs.in
ThinkLA
ABS
GtkterrmConfiggurationsforsettin
ngtheBau
udrate,Paarity,Stop
pbits
STEP1:PressALT+FF2andtypegtktermand
dpressenterrtoopentheeGtktermap
pplicationand
dclickonRu
un
nuandchoosePort
STEP2:GotoConfiggurationMen
TRITechnosolutionsPvtLLtdPage37o
of129 htttp://thinklabs.in
ThinkLA
ABS
ort:/dev/ttyyS0ifyouhavveconnected
dtotheseriaalcommuniccationport,iifnotchangeethe
STEP3:SelectthePo
Port.
STEP4:SelecttheSp
peedtotheB
Baudrateassperinyourcode,youhaaveconfiguredfortheUA
ART.
STEP5:SelectthePaarityasperinyourcode,,youhaveco
onfiguredfortheUART.
STEP6:SelecttheSttopbitsaspeerinyourco
ode,youhave
econfigured
dfortheUAR
RT.
STEP7:SelecttheBiitsasperinyyourcode,youhaveconfiguredfortheUART.
STEP8:SelecttheFlowcontrolttonone.
STEP9:ClickonOK
TRITechnosolutionsPvtLLtdPage38o
of129 htttp://thinklabs.in
ThinkLA
ABS
wareInsta
allationsforWind
dowsOS
Softw
WinAV
VR(Includesavrggcc,avrbiinutils,av
vrdude)
Copytheesoftwarep
packagesfromtheuNiBo
oardcontenttsonCDord
downloadlatestversion ofWinAVR from
websitegivenbelow
w:
http://w
winavr.sourceeforge.net/
Afteryouhavethisp
packagefollo
owthestepssgivenbelow
w:
Step1:R
Runthefilettoinstalltheepackage.
TRITechnosolutionsPvtLLtdPage39o
of129 htttp://thinklabs.in
ThinkLABS
Step2:SelectthelanguageandpressOK.
TRITechnosolutionsPvtLtdPage40of129http://thinklabs.in
ThinkLABS
Step3:clickonNext
Step4:ClickonIAgree
TRITechnosolutionsPvtLtdPage41of129http://thinklabs.in
ThinkLABS
Step5:TypethedestinationFolderwhereyouwanttoinstallWinAVRandclickonNext.
Step6:Checkonalli.e.Installfiles,AddDirectoriestopath,andProgrammersNotepadandclickonInstall.
Step7:Itwilldisplayasshownbelowandthenclickonfinish
TRITechnosolutionsPvtLtdPage42of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage43of129http://thinklabs.in
ThinkLABS
InstallingUSBdriversforuNiBoard
STEP1:InserttheuNiBoardUSBcabletoPC.
STEP2:Ifthedriversarenotinstalledthenitwilldisplaytheinstallationwizardasshownbelow.
STEP3:Selecttheoptionsasinstallfromalistorspecificlocation(Advanced)andclickonnext.Itwilldisplay
optionsasshownbelow
TRITechnosolutionsPvtLtdPage44of129http://thinklabs.in
ThinkLABS
STEP4:ClickonBrowseandselectthedriversfromtheCDUNIBOARDCONTENTSdirectorypathas
\UNIBOARDCONTENTS\UNIBOARD_DRIVERS\WINDOWS\usbaspandclickonOK
STEP5:ClickonNext.
TRITechnosolutionsPvtLtdPage45of129http://thinklabs.in
ThinkLABS
STEP6:GivethesamepathofdriversandclickonOK
TRITechnosolutionsPvtLtdPage46of129http://thinklabs.in
ThinkLABS
STEP7:ClickonFinish.
AfterthedriversareinstalledyouarereadytoprogramtheBoard.
TRITechnosolutionsPvtLtdPage47of129http://thinklabs.in
ThinkLA
ABS
Prog
grammingthe
eBoard
d
NOTE:R
Refertotheabovesectio
onstocheckthatyouare
ehavingalltherequiredsoftwaretoo
ols.
Gettin
ngStartedonLinu
ux
For proggramming th
he Board yo
ou must firsst have the hex file to be loaded in
nto the flash section off the
microco
ontroller. Forr generating the hex filee you have to
t write an error free code, compile your codee and
compilerwillgeneraatehexfile. Thenusing USBaspfirm
mwareonAtm
mega8micro
ocontrolleryyoucanproggram
theAtmega128micrrocontroller.
Thefollo
owingsectionwillguideyyouonhowtoprogram usinguNiBoard.
1. Wewillwriteaffirstprogram
mtotestLEDs.
AsyyouknowLEDscanbeco
onnectedvaarioustestPO
ORTsonUNiBoardusinggFRCcable (refertochaapter
5),w
wewilluseth
heGeneralp
purposePOR
RTCasoutputandconnecttheFRCcaablebetweenPORTCand
dthe
LEDPORT.
STEP
P1:OpenGeedit(referto
ochapter3)
STEP
P2:CreateaaProjectdireectory
TRITechnosolutionsPvtLLtdPage48o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP
P3:SavetheeFileasXfileename.c
TRITechnosolutionsPvtLLtdPage49o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP
P4:CopytheeMakefile(N
NOTE:MakeeistheUtilityywhichcallssallthecompilerrelatedoptionswhiich
areinscriptfilecalledasMaakefile)inyourworkingp
projectdirecttory
TRITechnosolutionsPvtLLtdPage50o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP
P5:Writeyo
ourcode.
TRITechnosolutionsPvtLLtdPage51o
of129 htttp://thinklabs.in
ThinkLABS
STEP6:Savethefile
STEP7:EdittheMakefileinthisfilechangeTARGET=Xfilename(withnoextensionsandnoquotes()).
Ifyouputanyextensionsitwontwork.
NOTE:Xfilenameindicatesanyfilenamethatauserwilluse.
TRITechnosolutionsPvtLtdPage52of129http://thinklabs.in
ThinkLA
ABS
STEP
P8:SavetheeMakefile.
STEP
P9:OnLinuxxbasedsysteems,youcan
nuseoneofthemakefileesofthesam
mplecodesm
markedas
Makkefile_LINUX
XbyrenamingittoMakeffile,failingw
whichyouwillgetanerro
orsayingNo
oruletomakke
targget.Stop.
STEP
P10:OntheEmbeddedtterminalgottotheProjecctdirectoryaandtype:maakeclean(thiswillremovveall
thepreviouslyco
ompiledfilessintheprojeectdirectoryy).
TRITechnosolutionsPvtLLtdPage53o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP
P10:Type:m
makeall(thisswillcompileethesourcefileandgen
neratehexfileifthereare
enoerrorsin
codee).
TRITechnosolutionsPvtLLtdPage54o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP
P11:type:m
makeprogram
m(thiswillb
burnthehexintothemiccrocontrollerr)
TRITechnosolutionsPvtLLtdPage55o
of129 htttp://thinklabs.in
ThinkLA
ABS
1.1.
ChangingtheFusesettin
ngs
NOTE:Theffusesettingmustbechaangedonlyiffrequired.
TheATmegaa128hasthreeefusebytesreferredassHighFuseB
Byte,LowFuseByteandExtendedFu
use
Byte.ReferttheATmega1
128datasheetforinform
mationonwh
hatthefusebitsare.Toccutthingsshort,
Fusebitscon
nfigurevario
ousoptionslikeEEPROMSAVE,ProgrrammingEnaable,ClockSpeed,Oscillaator
startuptimee,clocksourcceetc.
Thefollowin
ngTablereprresentsExten
ndedFuseByyte:
ExtendedFu
useByte BITNo.
Description
DefaultValue
TRITechnosolutionsPvtLLtdPage56o
of129 htttp://thinklabs.in
ThinkLABS
M103C
Atmega103compatibilitymode
0(programmed)
WDTON
WatchdogtimerisalwaysON
1(unprogrammed)
ThefollowingTablerepresentsHighFuseByte:
HighFuseByte
BITNo.
Description
DefaultValue
OCDEN
EnableOCD
JTAGEN
EnableJTAG
SPIEN
Enableserialprogrammingand
datadownloading
1(unprogrammed,
OCDdisabled)
0(programmed,
JTAGenabled)
0(programmedSPI
prog.enabled)
CKOPT
Oscillatoroptions
1(unprogrammed)
EESAVE
EEPROMmemoryispreserved
throughchiperase
BOOTSZ1
SelectBootSize
1(unprogrammed,
EEPROMnot
preserved)
0(programmed)
BOOTSZ0
SelectBootSize
0(programmed)
BOOTRST
SelectResetVector
1(unprogrammed)
ThefollowingTablerepresentsLowFuseByte:
LowFuseByte
BITNo.
Description
DefaultValue
BODLEVEL
Brownoutdetectortriggerlevel
1(programmed)
BODEN
Brownoutdetectorenable
SUT1
Selectstartuptime
1(programmed,
BODdisabled)
1(unprogrammed)
SUT0
Selectstartuptime
0(programmed)
CKSEL3
SelectClocksource
0(programmed)
CKSEL2
SelectClocksource
0(programmed)
TRITechnosolutionsPvtLtdPage57of129http://thinklabs.in
ThinkLA
ABS
CKSEEL1
Sele
ectClocksou
urce
0(programmed)
CKSEEL0
Sele
ectClocksou
urce
1(unprogrrammed)
TheMakeuttilityallowsp
programmingthefusebits.Thefollo
owingproced
durewillhelp
pyouconfigu
uring
thefusebitss.
STEP1:OnEEmbeddedteerminaltypeemakereadffuses(Thisw
willreadtheffusesettingccurrentlypre
esentonthe
board)assh
hownbelow.
Theoutputw
willbedisplaayedasshow
wnbelow:
TRITechnosolutionsPvtLLtdPage58o
of129 htttp://thinklabs.in
ThinkLA
ABS
ndEFUSEarethe
STEP2:EdittheMakefileeasshownintheabovepictureasperthefusessetting(HFUSSE,LFUSEan
labelstobeedited)thatisrequired.
STEP3:OnEEmbeddedteerminaltypeemakefuses(Thiswillreadthefusessettingcurreentlypresenttontheboarrd)
asshownbeelow.
NOTE:DON
NOTMESSW
WITHTHEFUSSEBITSUNLEESSYOUAREEVERYSUREEOFWHATEEFFECTITWOULDHAVE,
FAILINGWH
HICHTHEPRO
OGRAMMEMORYMIGH
HTBELOCKEEDFORWRITTING.
TRITechnosolutionsPvtLLtdPage59o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP4:Agaiinontheem
mbeddedterm
minaltypem
makereadfusestoverifytthatfusebithavebeenssaved.
TRITechnosolutionsPvtLLtdPage60o
of129 htttp://thinklabs.in
ThinkLA
ABS
difiedsuccesssfully.
Asshownbeelowthefuseesettinghavvebeenmod
TRITechnosolutionsPvtLLtdPage61o
of129 htttp://thinklabs.in
ThinkLA
ABS
Gettin
ngStartedonWin
ndows
Thesam
mpleprogram
mshavebeen
ngivenintheeCDfoldern
named
\UNIBO
OARDCONTENTS\UNIBO
OARD_SAMPLE_CODES\N
NON_RTOS\and
\UNIBO
OARDCONTEENTS\UNIBO
OARD_SAMPLLE_CODES\R
RTOS
Oryouccandownloaditfromourwebsiteatlinkhttp://thinklabs.in/d
download/
TRITechnosolutionsPvtLLtdPage62o
of129 htttp://thinklabs.in
ThinkLABS
TextEditor(programmersNotepad)
Step1:SelectProgrammersNotepadfromStartmenu>Programs>Winavr>ProgrammersNotepad.
Step2:Typeyourcodehereandsavethefileasshownbelow:
TRITechnosolutionsPvtLtdPage63of129http://thinklabs.in
ThinkLABS
STEP3:Savethefileasanyfilename.c
TRITechnosolutionsPvtLtdPage64of129http://thinklabs.in
ThinkLABS
STEP4:Youcanviewthelinenumbersbyselectingviewmenu>LineNumbers.
TRITechnosolutionsPvtLtdPage65of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage66of129http://thinklabs.in
ThinkLABS
CompilethecodeandprogramtheboardonWindows(CommandPrompt)
STEP1:OpenthecommandpromptbyselectingStart>Runandtypecmd
STEP2:ItwilldisplaytheCommandpromptandgotoyourprojectdirectory.
TRITechnosolutionsPvtLtdPage67of129http://thinklabs.in
ThinkLABS
STEP3:YoumusthavetheMakefileinyourprojectdirectory.Incaseofwindowsyouwouldfindafile
namedMakefile_WINDOWS,whichyoucanrenameasMakefile.Makesurethatyouhaveonlya
singleMakefileinyourworkingdirectory.
STEP4:EdittheMakefileandsetTarget=filenameofyourCfileandsavethefile.
TRITechnosolutionsPvtLtdPage68of129http://thinklabs.in
ThinkLABS
STEP5:Incommandpromptwindow,typecommandasmakecleanandpressenter
TRITechnosolutionsPvtLtdPage69of129http://thinklabs.in
ThinkLABS
STEP6:Thiswillremoveallpreviouslyfilescreatedduetocompilationasshownbelow:
TRITechnosolutionsPvtLtdPage70of129http://thinklabs.in
ThinkLABS
STEP7:typemakeallandpressenter
TRITechnosolutionsPvtLtdPage71of129http://thinklabs.in
ThinkLABS
STEP8:ThiscommandwillcompilethefileandgenerateaHexfile.Typedirandpressenterandcheckif
therehexfilegeneratedasshownbelow.
TRITechnosolutionsPvtLtdPage72of129http://thinklabs.in
ThinkLABS
STEP9:Forloadingthecompiledoutputtotheboardtheboardi.e.burningthehexfileintotheAtmega128
typecommandasmakeprogram.
TRITechnosolutionsPvtLtdPage73of129http://thinklabs.in
ThinkLABS
STEP10:pressenter
TRITechnosolutionsPvtLtdPage74of129http://thinklabs.in
ThinkLABS
Usinghyperterminalofwindows
STEP1:RunHyperTerminalstartmenu>allprograms>accessories>Communications>HyperTerminal.
STEP2:Typenameformakenewconnection
STEP3:Selecttheserialport(usuallyitisCOM1)
TRITechnosolutionsPvtLtdPage75of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage76of129http://thinklabs.in
ThinkLABS
STEP4:SelecttheBaudrate(9600),Databits(8bits),parity(none),stopbits(1),andflowcontrol(none)as
shownbelow.
TRITechnosolutionsPvtLtdPage77of129http://thinklabs.in
ThinkLABS
STEP5:YoucanevensavethisconnectionfromFile>savesothatyouneednotsetallthesettingsagain.
TRITechnosolutionsPvtLtdPage78of129http://thinklabs.in
ThinkLABS
GettingStartedwithRTOS(uC/OSII)onWindowsOS
uC/OSIIHardwareandSoftwareArchitecture
BeforestartingofwiththeuC/OSIIprogrammingyouneedtoknowitsfilestructurei.e.howtheuC/OSII
sourcecode andits portsarestructured. The diagrambelow givesanideaofthewayin whichthese files
havebeenmaintained.Forfurtherinformationonthis,refertoMicroC/OSII,TheRealTimeKernelbyJean
Labrosse.
TRITechnosolutionsPvtLtdPage79of129http://thinklabs.in
ThinkLABS
EveryRTOSproject/sourcecodeconsistsof(asshownintheabovefigure):
Portablekernelcode:ThisisgenerallyacodewritteninANSICwhichcanbeportedtoanyplatform
fulfillingcertainrequirementslikememoryfootprint,computationalpower,numberofregistersetc.
BSPorportfiles:Thesearespecifictoanarchitecture,soforeveryarchitecture/boardthereisa
uniqueBSP/portfiles.
Configurationfiles:Thesearefileswhichcanbeusedtooptimizethekernelandreducethememory
footprintofthekernelimagebasedonwhatfeaturesofthekernelwouldbeusedbyanyapplication
program.
Applicationprogram:ThisisgenerallywrittenontopofthekernelcodeandutilizeskernelAPIsand
functionsexportedbytheOSfortheusersoftheRTOS.
Code,CompileandprogramtheRTOS(uC/OSII)programsonLinuxOS
NOTE:YouShouldhavetherequiredsoftwaretoolsi.e.texteditor,compiler,programmerandserial
terminalasshowninthesectionsubsectionSoftwareInstallationsforLinuxOS.Alsorefertothesub
sectionGettingstartedonLinux.
STEP1:CopytheMicriumdirectoryfromtheUNIBOARDCONTENTSfromthepath"\UNIBOARD
CONTENTS\UNIBOARD_UCOS_DOCS"totheuser'shomedirectory.
NOTE:YoucangototheusershomedirectoryfrommenuPlaces>>HomeFolder.
STEP2:CopythesamplecodesgivenintheUNIBOARDCONTENTSfromthepath\UNIBOARD
CONTENTS\UNIBOARD_SAMPLE_CODES\RTOSontoyourdisk.Intheproject/samplecodethatyouwant
toexecute,RENAMEMakefile_LINUXtoMakefile.
STEP3:Opentheevent_sem.cfileusingGeditEditor(refertothesubsectiongettingstartedonLinux).
TRITechnosolutionsPvtLtdPage80of129http://thinklabs.in
ThinkLA
ABS
STEP4:Gotothecu
urrentprogramdirectoryyfromGeditEmbeddedtterminalusin
ngcdcommandorrightclick
onBotto
omterminalandselectchangedirecttory(referto
othesubsecctiongettinggstartedonLinux).
TRITechnosolutionsPvtLLtdPage81o
of129 htttp://thinklabs.in
ThinkLA
ABS
ditEmbeddeedterminal.
STEP5:TypemakecleanonGed
TRITechnosolutionsPvtLLtdPage82o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP6:TypemakeallonGeditEmbeddedtterminal.
TRITechnosolutionsPvtLLtdPage83o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP7:TypemakeprogramonGeditEmbeddedtermin
nal.
TRITechnosolutionsPvtLLtdPage84o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP8:Entertherootpassword
dtoprogramtheBoardandpressentter(ifpromp
pted).
TRITechnosolutionsPvtLLtdPage85o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP9:TurnOFFth
heuNiBoardafterthepro
ogramhasbe
eenloadedssuccessfullyaasshownbelow.
TRITechnosolutionsPvtLLtdPage86o
of129 htttp://thinklabs.in
ThinkLA
ABS
STEP10:OpenGtktterm(referto
othesubse
ectionGtkterrmConfiguraationsforseettingtheBaaudrate,Parrity,
Stopbits).
TRITechnosolutionsPvtLLtdPage87o
of129 htttp://thinklabs.in
ThinkLA
ABS
heuNiBoardandOutputwillbedispllayedasshow
wnbelowon
nGtkterm.
STEP11:TurnONth
TRITechnosolutionsPvtLLtdPage88o
of129 htttp://thinklabs.in
ThinkLABS
Code,CompileandprogramtheRTOS(uC/OSII)programsonWindowsOS
NOTE:YouShouldhavetherequiredsoftwaretoolsi.e.texteditor,compiler,programmer,serialterminal
andrequireddriversforprogrammerasshowninthesubsectionSoftwareInstallationsforWindowsOS.
STEP1:CopytheMicriumdirectoryfromCDContentsdirectorypathas\UNIBOARD
CONTENTS\UNIBOARD_UCOS_DOCS\toC:\.
STEP2:GototheUNIBOARDCONTENTonCDinthedirectory\UNIBOARD
CONTENTS\UNIBOARD_SAMPLE_CODES\RTOS\andcopyityourdisk.
STEP3:GototheRTOSdirectorythatyouhavejustloadedonyourdisk.Selectoneofthesamplecodee.g:
3_SEMAPHORES.RenametheMakefile_WINDOWStoMakefileinthecurrentexampledirectory.
STEP4:OpentheMakefileusingTextEditorandsearchfortheTARGETlabel.Inthisexampleitis
event_sem.csoassignTARGET=event_semasshownbelowatline47.
NOTE1:InMakefileTarget=Filenameshouldbewithoutanyextensionsasshownbelowatline47.
NOTE2:CheckthePathsettingforuCOSIIMakefileasshownbelow(forWindowsOSonly)atline62and
63.Seethatitiscomplyingwiththepathshownbelowinthescreenshot.
NOTE3:ChecktheprogrammersAvrdudeoptionsasshownbelow(forWindowsOSonly)atline208.
TRITechnosolutionsPvtLtdPage89of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage90of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage91of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage92of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage93of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage94of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage95of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage96of129http://thinklabs.in
ThinkLABS
STEP5:Openevent_sem.cfromthecurrentdirectoryandthecodewillbedisplayedasshownbelow.
TRITechnosolutionsPvtLtdPage97of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage98of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage99of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage100of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage101of129http://thinklabs.in
ThinkLABS
NOTE: Check the code at line 108 to 112 in function named as void MyTask(void *pdata). This code is
initializing the timer0 i.e. required by scheduler for correct time delays and this macro named as
CPU_CLOCK_HZandOS_TICKS_PER_SECaredefinedinthefileos_cfg.hasshowninnextstep.
STEP6:Openos_cfg.hfromthecurrentdirectoryandthecodewillbedisplayedasshownbelow.
TRITechnosolutionsPvtLtdPage102of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage103of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage104of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage105of129http://thinklabs.in
ThinkLABS
TRITechnosolutionsPvtLtdPage106of129http://thinklabs.in
ThinkLABS
NOTE 1: Here in this file os_cfg.h check at the line 27 for the macro CPU_CLOCK_HZ which should be
assigned as 16MHZ i.e. the CPU frequency and at line 67 the macro OS_TICKS_PER_SEC which should be
assignedas61.
NOTE2:Ifyouwanttouseanyfeatures/APIsoftheuC/OSIIenableiti.e.forexampleinthiscodewehave
used semaphore so we need to enable the API in os_cfg.h file as shown at line 105 macro named
OS_SEM_ENshouldbesetto1.Ifyoudontdothisthencompilerwillpromptforundefinedreferencefor
thatAPIcall.
STEP7:Gotopromptandtypemakeclean
NOTE:IfthereisErroronmakecleanasshownbelow
TRITechnosolutionsPvtLtdPage107of129http://thinklabs.in
ThinkLABS
make:***Noruletomaketarget`/home/XYZUSER/ucosII/software/uCOSII/Source/ucos_ii.c',needed
by`ucos_ii.d'.Stop
Thenyouneedtoremove*.dfilesfromcurrentprogramdirectory.Typerm*.dandthentrytousemake
cleancommandagain.
STEP8:Gotopromptandtypemakeall
TRITechnosolutionsPvtLtdPage108of129http://thinklabs.in
ThinkLABS
STEP9:Gotopromptandtypemakeprogram
TRITechnosolutionsPvtLtdPage109of129http://thinklabs.in
ThinkLABS
STEP10:TurnOFFtheBoardsPowerSwitch
STEP11:OpentheHyperTerminalutility(refertosectionUsingHyperterminalofWindows).
STEP12:NowturnitON.Theoutputwillbedisplayedasshownbelow
TRITechnosolutionsPvtLtdPage110of129http://thinklabs.in
ThinkLABS
YoucanalsodownloadthelatestuC/OSIIsourcecodefromMicriumwebsitelinkas
http://www.micrium.com/products/rtos/ucosii_download.htmlandportsforAtmelsMegaseriesfrom
http://www.micrium.com/atmel/ATmega.html
TRITechnosolutionsPvtLtdPage111of129http://thinklabs.in
ThinkLABS
Troubleshooting
Makeutility
Makesurethatyouareincurrentprojectworkingdirectory.
MakesurethatyouhaveMakefileinyourcurrentworkingdirectory.Ifnotthenrenamethe
Makefile_WINDOWSorMakefile_LINUXtoMakefilefromuNiBoardContents.
MakesurethatyouhavepoweredontheBoard.
Makesurethatprogramselectionswitchispressed.
MakesurethatyoudonothavemultiplefilesnamedMakefileinthecurrentworkingdirectory.
LEDs
MakesurethatyouhaveconfiguredPortasoutput.
MakesurethatyouhaveconnectedtheFRCcablecorrectlytotheportwhereyouareplanning
tointerfacetheLEDs.
UART
MakesurethatyouareconfiguringthecorrectUARTport.Generallyforserialcommunication
youwouldbeusingUART1sinceDB9connectorisavailableonlyonUART1.
Makesurethatbaudratethatyouareusingisthesameatboththeends.
MakesurethatyouhavenotopenedmultipleGtktermapplicationorHyperTerminal.
MakesurethatyouhaveconnectedSerialCablecorrectlyandthereisnoloosecontact.
MakesurethatyouhavenotforgottentocalltheInitializationcode.
MakesurethatthereisnoloosecontactontheH/W.
PoweruptheBoardagainifsomerandomstringcomesonLCD.
LCD
Joystick
MakesurethatyouareusingcorrectADCchannel.
MakesurethatJoystickselectionswitchispressed.
TRITechnosolutionsPvtLtdPage112of129http://thinklabs.in
ThinkLABS
LDR
MakesurethatyouareusingcorrectADCchannel.
MakesurethatLDRJumperisplacedontheBoardandinthecorrectposition.
ExternalInterrupts
Makesurethatyouhaveenabledpullupsinyourcode.
MakesurethatyouhaveenabledGlobalInterrupt.
MakesurethatyouareenabledCHbitinRTCconfiguration0x00RTCsmemoryarea.
Makesurethatyouhaveworkingbackupbatteryforcorrecttimeevenifboardispoweroff.
Makesurethatyourconnectionsareproper;youneedtoremovetheprogramjumperanduse
thebergconnectortoconnectthewiretoanotherSPIdevice.
MakesurethattheGNDpointsofthemasterandslavehavebeenconnected.
RTC
SPI
Motordrivers
Makesurethatyouhaveconnectedexternalpowersupply.
MakesurethatyourADCchipisthereontheBoard.
Makesurethatpowerselectionswitchisdepressed
TRITechnosolutionsPvtLtdPage113of129http://thinklabs.in
ThinkLABS
WhatyoucandowiththeuNiBoard
ThissectiondescribesthepurposeofeverysampleCodegivenintheCDsuNiBoardContentsdirectory
whichcontainsthesamplecodesforRTOSbasedandNonRTOS.
NOTE:ThesamplecodegivencontainstheMakefile.YouneedtorenametheMakefile_LINUXtoMakefile
forLinuxOSandsimilarlyMakefile_WINDOWStoMakefileforWindowsOSwhileusingthecode.
InNonRTOSbasedsamplecodeswewilldescribeinshortwhatthecodeismeantforandwhatsortof
outputitwilldemonstrate:
1. PORTS
TheLEDSareconnectedtooneofthegeneralpurposeport(PORTC)availableoftheATmega128.These
LEDs are connected using the FRC cable. The open FRC connectors are given on the uNiBoard so that
theirstatuscanbemonitoredbyinterfacingthemtoLEDsusingtheFRCcable.
2. Timer0usingInterrupt
TheSoftwareclockisimplementedusinghardwaretimer,Timer0inNormalmodesuchthatitgenerated
and Interrupt after every 1ms. The Boards Crystal is 16MHZ and PRESCALAR is set to 1024 therefore
16MHZ/1024 = 0.000064 sec (resolution of timer). So for timer to overflow for every 1ms we need to
loadthecount((25615)=241)as0.000064*15=0.96msec~1msec.TheclockisdisplayedonLCD
andUART.
3. Switches
TheSwitchesontheuNiBoardareconnectedtogeneralpurposeportpinsofthecontroller.Soyoucan
usethisswitchesforreadingtheinputsfromtheuser.TheSW1isconnectedtoPORTDSsPIN7andSW2
isconnectedtoPORTDsPIN6ofthecontroller.
4. EEPROM
TheATmega128hasanonchipEEPROM(4KB)sothatyoucanuseittostorethenonvolatiledata.The
code contains the some library functions so that you can store the contents in a particular pattern or
same data at locations by specifying start address and end address. The output is debugged on serial
window.EESAVEfusebithastobeenabledorelseoneveryprogrammingcycletheEEPROMwillalsobe
erasedalongwithflash.
5. JoystickandVTlibrary
The Joystick (analog joystick of PS2 fame) is used as a mouse on the serial window in this sample
example.TheJoystickXaxisisconnectedtotheonchipADCchannel0andYaxistochannel1.TheADCis
configured such that it gives an interrupt after the conversion is over. Since only one ADC channel
conversionisdoneatatimesoweneedtoreconfigureitforotherchannel.TheADCconversionvalueis
storedinADCsDataregister.
TRITechnosolutionsPvtLtdPage114of129http://thinklabs.in
ThinkLABS
TheVT100isvideoterminalmadebyDEC.Itbecameadefactostandardusedbyterminalemulators.
DigitalsfirstANSIcompliantterminal,introducedinAugust1978.TheVT100wasmoreofarchitecture
thanasimpleterminal.Therearetwodisplayformats:80columnsby24linesand132columnsby14
lines.Aseparateadvancedvideooptionwasrequiredtodisplay24linesin132columnmode.Thiswas
standardontheVT102andVT131.
We will use the same VT102 commands for serial terminal. The header file contains APIs which uses
VT102standardsequencecharactersforchangingtheconfigurationsoftheserialterminal.
The cursor on the hyper terminal / Gtkterm can be controlled using the joystick and the joystick
sensitivity/cursor speed can also be changed by pressing SW4. There are 3 different speeds
programmed.
6. LCD
The LCD can be used as an output device and can be placed on the uNiBoard LCD connector. The
hardwareconnectionsareasfollows:
LCDcontrollinesEnable(PD2)
R/~W(HardwiredGND)
RS(PD0)
LCDdatalines(PD4PD7).ThereforeLCDisinitializedusing4linemode.
ThegivenLCDlibrarycontainstheAPIsforprintingcharacter,string,values(decimal)onLCD,changing
theLCDpositions,clearingtheLCDscreen.
7. UART
TherearetwoUARTsoncontroller.OntheuNiBoardUART1isusedtoconnecttotheRS232portand
openUART0connectorgivenontheboardforconnectingthedeviceswithTTLcompatibledevice.
TheUARTlibrarygivenconfigurestheBaudrate,databits,andparityandstopbits.Refertothesection
UsinghyperterminalforWindowsforWindowsOSandGtktermConfigurationsforsettingtheBaud
rate,Parity,StopbitsforLinuxOS.
8. SPI
There are two programs given for SPI, one for Master and another for Slave. You can communicate
betweentwouNiBoardbyconnectingwiresonSPIlinesandmakingGNDcommonofboththeboards.
TheOutputisdebuggedusingtheserialterminalwhatevercharactertypedonmastersserialterminalis
transferredtotheslavesserialterminalusingSPI.MakesureyouhaveconnectedtheSPIlinesandthe
GNDpointsofthemasterandslavecorrectlyasfollows:
TRITechnosolutionsPvtLtdPage115of129http://thinklabs.in
ThinkLABS
MASTER
SLAVE
MISO
MISO
MOSI
MOSI
SCK
SCK
SS
SS
GND
GND
9. I2C(RTC)
TheDS1307istheRTC(RealTimeClock)chipinterfacedontheI2Clinesofthecontroller.TheAPIscan
be used for reading the date and time from RTC. Before reading you need to call this API
Update_RTC_variables()whichactuallyupdateslocalvariablesthatdataandtimeAPIsreturns.Youcan
also set date and time for RTC using Write_RTC() API and date and time values for writing to RTC
registersaretakenfromRTC_def_cfg.h.
TheoutputcanbeseenontheUART.
10. Buzzer
TheBuzzerisconnectedonPA3.ThesamplecodeconfiguresthepinasoutputandBuzzercanbeON
andOFFbysettingthisPINHighandLOWrespectively.
InRTOSbasedsamplecodeswewilldescribeinshortwhatthecodeismeantforandwhatsortofoutput
youshouldexpecttobedemonstratedwhileyouarerunningaparticularsamplecode:
1. Multitaskingrandom
This is a sample program that displays random numbers on the screen. The number is placed on the
random positions on the screen. Also displays the CPU utilization and number of tasks running on the
Serialterminal.
2. Snake
Thisisagameforplayingsnake.Therearefourtasksusedinthegame.Thetask1printsthescoreonthe
screenandalsoprintsthestartmessageontheLCDandUART.Scoreisupdatedbythetask4andissent
totask1forprinting.ThisisdoneusingMailbox.Task2isusedforgeneratingfoodonthescreenafter
particulartimeinterval.ThisintervalissetbyTask3.Thistaskbasicallyblocksthetask2andsignalsafter
aparticularinterval.Thisisdonebyusingsemaphoresaseventflags.Task4isusedprintingthesnake
andalsoupdatesthescoreifthesnakeeatsthefoodandsendsthescoretotask1forprintingonserial.
TRITechnosolutionsPvtLtdPage116of129http://thinklabs.in
ThinkLABS
The score is printed by this task on LCD whenever snake eats food. Also every time food is generated
LEDswouldblink.EverytimetheSNAKEeatsfoodthebuzzerwillgiveabeepsound.
3. Semaphores
Thisisasamplecodewhichdisplaysthesharedresourceasaglobalvariablewhichissharedamongthe
varioustasks.Therearefourtaskswhichwritetothesameglobalvariableandoneprinttaskwhichwait
forthesignalandoncegetthesignalprintsthevalueoftheglobalvariableonUARTandagainwaitfor
theeventtooccur.
4. Mutex
ThisisasimpleexamplewhichshowshowthepriorityinversionproblemcanbereducedusingMutex.In
thisexamplethereare3taskswhichillustratehowalowprioritytaskownsaresourceandusesaMutex
toinheritthepriorityofthewaitingtaskofhigherpriorityandthiscanbeseenonserialterminal.
5. MailBox
InthissamplecodethemessageisbeenupdatedbymanytasksusingMailBoxwhileprinttaskwaitstill
theMessagehasbeenwrittenandafterthatMessageisprintedbytheprinttask.Sothisshowshowthe
message is not allowed to be modified by the other task once task owns theresource (Message). The
higher priority task is the print task which will print the Message when one of the task releases the
resource(Messagemailbox).
6. MessageQueues
ThissamplecodeillustratestheuseofMessagequeuebytwotaskspostingthemessageandonetask
whichprintthismessageonUART.
7. ISRandDeleteTask
This is sample program in which the semaphores are used to update the shared variable among the
varioustasks.Maintask(higherpriority)waitingfortheeventtooccurusingsemaphoreaseneventflag.
Whenever the interrupt occurs the scheduler executes its corresponding ISR. The ISR signals the main
taskbypostingthesemaphoreandsignalinganevent,thenthemaintaskdeletesthetaskonebyone
andalsodeletesthetaskitself.
TRITechnosolutionsPvtLtdPage117of129http://thinklabs.in
ThinkLA
ABS
Addons
Whatwehavediscu
ussedtillnow
waresome completelysstandaloneaactivities.Weassumeth
hatyouwonttjust
t
activitties and exp
plore the boards powerr further using accessoriies like SD/M
MMC
limit yourselves to these
card interface (SPI based) or Etthernet interface (SPI baased). You can
c interfacee these addons that wiill be
bsitehttp://tthinklabs.in//shopinashortwhile.
availableeonourweb
MCcard
SD/MM
Interfaace
Activitieesrelatedtothese
productslikereadingga
FAT
partition
ned/formattedSD
card,fileehandlingussingthe
Embedd
dedFileSysteemlibrarycaan
bedoneeusingtheSD
D/MMCcard
d
interfaceewhichcom
mesalongwitth
adetaileedusermanu
ualand
applicationnotes.
Ethern
netInterfface
Moreover,ifyoufeeelthatyouw
wanttomakketheboard
dEthernetenabledyou should
net controlleer board thaat we are pllanning to ccome up
w
with.
definitelly check outt the Ethern
Activitieesrelatedto usingthisb
boardwithth
heuNiBoard
dwillbeuplo
oadedshortlyonourwe
ebsite.Usinggthe
Ethernet controller you can also port thee open sourrce uIP stackk by Adam Dunkels an
nd enhance your
dedprojectsbymakingth
hemEtherneetenabled.YYoucanalsobuildstuffliikeanembeddedwebseerver
embedd
orcontrrolyourboarrd/devicesco
onnectedtotheboardovvertheEthernet.
TRITechnosolutionsPvtLLtdPage118
8of129 htttp://thinklabs.in
ThinkLABS
uNiBoardv1.1Schematic
Controllersection:ATmega128pinconnections
TRITechnosolutionsPvtLtdPage119of129http://thinklabs.in
ThinkLABS
Buzzersection:
Joystickandconnectorssection:
TRITechnosolutionsPvtLtdPage120of129http://thinklabs.in
ThinkLABS
LCDsection:
LDRsection:
LEDssection:
TRITechnosolutionsPvtLtdPage121of129http://thinklabs.in
ThinkLABS
MotorDriversection:
Powersupplysection:
RTCsection:
TRITechnosolutionsPvtLtdPage122of129http://thinklabs.in
ThinkLABS
Sensorportsection:
Switchessection:
UARTsection:
TRITechnosolutionsPvtLtdPage123of129http://thinklabs.in
ThinkLABS
USBprogrammersection(Courtesy:http://www.fischl.de/usbasp/):
TRITechnosolutionsPvtLtdPage124of129http://thinklabs.in
ThinkLA
ABS
Licen
nsingtterms
TheuNiBoardislicensedbythe CreativeCommonslicen
nse(formoreedetailsrefeerLicense.txxtinCDconttent),
which has
h
the philosophy off Share, Remix,
R
Reusse
Legally.Itmeansth
hatanyoneisallowedto
oproducecopies
oftheboard,toredeesignit,oreeventosellb
boardsthatccopy
thedeesign.Youdo
ontneedtopay
a licen
nse fee to the
t ThinkLA
ABS team orr even ask p
permission. However, iff you
repub
blish the refeerence desiggn, you havee to credit th
he original group. And iff you
tweako
orchangetheboard,you
urnewdesiggnmustusethesameo
orasimilarC
CreativeCom
mmonslicensseto
ensuretthatnewverrsionsoftheboardwillbeequallyfre
eeandopen.
TRITechnosolutionsPvtLLtdPage125
5of129 htttp://thinklabs.in
ThinkLABS
BillofMaterials(BOM):
Sr.no.
1
10
11
uNiBoardver.1.1BillofMaterials
Components
Microcontrollers
Atmega128(TQFP)
Atmega8(TQFP)
Otherchips
L293DMotordriver
7805voltageregulator
MAX232leveltranslator
DS1307RTC
Batterybackup
Battery3V(buttoncell)
Crystal
16MHz(forAtmega128)
12MHz(forusbasp)
32.768KHz(forRTC)
Sensors
LDR
PS2AnalogJoystick
Sockets
16pinICbase
Batterycellholder
LCD
16x2AlphanumericLCD
Cables
Serialcable(DB9FtoDB9M)
USBCable
FRCCables
LED
RedLEDSMD
Buzzer
5VBuzzer
Connectors
DCJack(PCBmountable)
PTRconnector
DB9Rightanglefemale
USBconnector
10pinFRCconnector
Bergheader(male)
Bergheader(female)
Quantity
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
11
1
3
1
1
4
1set
1set
TRITechnosolutionsPvtLtdPage126of129http://thinklabs.in
ThinkLABS
12
13
14
15
16
17
Diodes
3.6VZener
4148Diode
Resistors
1K
10K
270K
330Ohms
2K2
4K7
68Ohm
1KSMDSIP
10KPOT
Capacitors
100uF/10V
4.7uF/50V
470uF/16V
220uF/16V
15pF
22pF
0.1uF
0.22pF
Transistors
2N2222
Switches
Powerswitches(PushtoON)
SMDMicrokey
Twopinjumpers
Metalspacers(3x15)
2
1
3
2
2
2
2
2
2
2
1
1
1
1
1
2
2
15
2
3
5
2
4
TRITechnosolutionsPvtLtdPage127of129http://thinklabs.in
ThinkLABS
AppendixAReferences
Websites:
www.atmel.com
www.avrfreaks.net
www.fishl.de/usbasp/
www.maximic.com
http://en.wikibooks.org/wiki/Embedded_Systems/Atmel_AVR
Books:
1. MicroC/OSIIbyJEANJ.LABROSSE
2. Programming&CustomizingTheAVRMicrocontrollerByDhananjayV.Gadre
3. EmbeddedCProgrammingandtheAtmelAVRByBarnettandCox
4. AVRRISCMicrocontrollerHandbookByAtmel
TRITechnosolutionsPvtLtdPage128of129http://thinklabs.in
ThinkLABS
AppendixBServicesandSupport
Ourwebsitesupport:
ForanytechnicalqueriesrelatedtouNiBoard:
http://www.thinklabs.in/forums/
Forarticles,activitiesandupdatesrelatedtouNiBoard:
http://www.thinklabs.in/resources/
ForpurchasinguNiBoardaccessoriesorotherrelatedcomponents:
http://www.thinklabs.in/shop/
TRITechnosolutionsPvtLtdPage129of129http://thinklabs.in