This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PINSEL4 0x4002C010 | |
#define PINMODE4 0x4002C050 | |
#define PCONP 0x400FC0C4 | |
#define PINMODE_OD2 0x4002C070 | |
#define FIO2DIR 0x2009C040 | |
#define FIO2SET 0x2009C058 | |
#define FIO2CLR 0x2009C05C | |
int delay_ms(unsigned long millisecond) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include"config.h" | |
#include<avr/io.h> | |
#include<util/delay.h> | |
//auto triggering mode is not used here in this library .. (ADATE in ADCSRA) | |
//differential input ADC has not been included in this library .. ADMUX (MUX[4:0]) | |
//see in the Internet how the shift register is optimized for the constant variable shifting .. | |
//whether a constant value is assigned or shifting process is left for the processor .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************//** | |
* @file LPC17xx.h | |
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File for | |
* NXP LPC17xx Device Series | |
* @version: V1.08 | |
* @date: 21. December 2009 | |
* | |
* @note | |
* Copyright (C) 2009 ARM Limited. All rights reserved. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "LPC17xx.h" | |
#include <stdint.h> | |
#include "uart2.h" | |
#include <stdlib.h> | |
int main() | |
{ | |
SystemInit(); | |
char data; | |
char temp[15]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Author : Subha Sarkar | |
#include<opencv2/opencv.hpp> | |
#include<opencv2/highgui/highgui.hpp> | |
#include<opencv2/imgproc/imgproc.hpp> | |
#include<math.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#define RADIUS 150 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I = imread('check2.jpg'); | |
%it is already in binary format | |
%I = rgb2gray(I); | |
I = I.*255; | |
%default values are 0,1 in binary so to show the image all 1's are | |
%multipled by 255 | |
gaussian = fspecial('gaussian',3,1); | |
%derivative in x direction | |
dx = [1 0 -1;1 0 -1;1 0 -1]; | |
%derivative in y direction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module practise #(parameter width = 8) | |
( | |
input [width-1:0]multiplier,multiplicand, | |
output [2*width-1:0]product | |
); | |
assign product = multiplier*multiplicand; | |
endmodule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stm32f10x.h" | |
//core peripherals of the CPU .. address taken from the data sheet | |
#define NVIC_ISER0 *((unsigned int*)0xE000E100) | |
int main() | |
{ | |
//NVIC_InitTypeDef TIM2_INT; | |
//Reset and clock control : enabling the clock source for the timer2 | |
RCC->APB1ENR |= RCC_APB1ENR_TIM2EN; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
module DDS( | |
input mainClock, | |
output [9:0]cosine, | |
output [9:0]sine, | |
output reg [2:0]stateMachineCounter, | |
output reg angleLatch, | |
output strobe | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stm32f10x.h" | |
void delay(uint32_t); | |
int main() | |
{ | |
//Enabling the peripheral for the GPIOC in RCC sector | |
RCC->APB2ENR |= RCC_APB2ENR_IOPCEN; | |
//the led is connected to PC13 in Mini dev board. |
OlderNewer