Partner sites: Aminet - Amiga downloadsIntuitionBase - Amiga guidesAmigaNN - Amiga newsAmiFund - Sponsor projects

[Y]UtilityBase
Your guide to Amiga development
Not logged in
  HomeProjectsForumArticlesResourcesLinksChatAbout 
Search
Login
Username:
Password:
Register now!
Forgot your password?
Aminet - Development
Blitz_AVI.lha (dev/basic)
bullet.lha (dev/lib)
MCC_TheBar-26.6.lha (dev/mui)
MCC_TextEditor-15.35.lha (dev/mui)
MCC_BetterString-11.19.lha (dev/mui)
fw_c2p_p2c.lha (dev/lib)
plib_examples.lha (dev/src)
plib.lha (dev/lib)
MCC_NList-0.107.lha (dev/mui)
MCC_NList-0.106.lha (dev/mui)
More...
Newest users
prowler
apache64 (Chris)
cpeel2300 (Chris)
Branquito
chris (Chris Young)

Pending:
ZebraZeem, Mad_Dog, hhjoker, voxel, JosDuchIt, MarcB, MarBo, Sollaris, sara, species
More...
Who's Online
Online members:

centaurz 34 min(s) ago

8 guests are online.

You are an Anonymous user. You can register for free by clicking here.
News sites
Amiga-News.de
Amiga.org
AmigaNN
Amigans.net
Amigaweb.net
AmigaWorld.net
AROS-Exec
MorphOS-News.de
MorphZone
polarBoing
Tutorials
Change Graphics cards in AmigaOS 4.
Installing the latest OS4 SDK in Cubic IDE
Writing Installer scripts for AmiUpdate
Cross Compiling for OS4 or OS3 using MS Visual Studio 2005
Installing an AmigaOS 4 cross compiler
More...
Sources
How to open and use the exec debug interface
How to install a hardware interrupt
Install SObjs with Installer
How to make clean picture datatypes
Most of the old ClassACT examples converted to OS4
More...
Documentations
How to write portable code for Amiga (english)
Comment écrire du code portable pour Amiga (français)
Development How to with OS3.9 SDK
The PartyPack Hack
The Amiga PDA Programming Guidelines
More...
DreamHost

Support
UtilityBase

[Valid RSS]

UtilityBase needs your help!

Description:
Language:c
Nickname:
Page URL:http://utilitybase.com/paste/wtN
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
[code:c]/*Program of 8051 single-chip pulse width modulation (PWM) brightness control of LED lights, as we all know 8051 does not have an pwm interface on it. This process is simulated by software PWM. The adjustment of high and low duty cycle of the square wave frequency can be realized to control LED brightness*/
#include "AT89X51.H" //simulation of PWM output control lamp brightness level of 10
unsigned int scale; //duty cycle control variable
void main(void) // main program
{ unsigned int n; //delay cycle variables
        TMOD=0x02; //timer 0, mode 2 (0000,0010), 8-bit timer mode
        TH0=0x06; //write the timer 0 preset initial value, so that an overflow of 250 microseconds (12MHz)
        TL0=0x06; //written into the preset value
        TR0=1; //start timer
        ET0=1; //allow timer 0 interrupt
        EA=1; //Enable global interrupt
        while(1) //infinite loop, the main work is done here
        { for(n=0;n<50000;n++); //every time, automatically increases the brightness of a grade
                scale++; //duty cycle control variable scale plus 1
                if(scale==10) scale=0; //if the scale = 10, so that scale is 0
        } }
timer0() interrupt 1 //Timer 0 interrupt service routine
{ static unsigned int tt ; //tt used to save the current time in a second location in the proportion of
        tt++; //microsecond increase of 1 per 250
        if(tt==10) //2.5 ms cycle clock
        { tt=0; //so that tt = 0, start a new cycle of the PWM
                P3_0=0; //make LED lights ON
        }
        if(scale==tt) //in accordance with the present duty cycle output for high switching
        P3_0=1; //make LED lights OFF
}
/*Process tt = 0 from the beginning to the low scale from the scale to the tt = 10 for high, as the scale is variable, so changing the scale on the duty cycle can be changed.  */[/code]


T


Latest pastes
Executionery (text) by anonymous 7 hours ago
<div style="border:1px solid; border-color:#000000; color:#000000; width:300px; height:305px; ove...
ironver (text) by sdfsdf 1 day ago
Global $Attempts = 0 Global $Plus = 0 Global $Elixirs = 0 Global $1 = 0 Global $2 = 0 Glob...
new (text) by fdfsdf 1 day ago
#include <Date.au3> Global $Attempts, $Plus, $Elixirs Global $aArray[20], $aCLabel[10][2] Glob...
xFauxxi (text) by anonymous 2 days ago
<div style="border:1px solid; border-color:#000000; color:#000000; width:905px; height:40px; over...
idc (text) by anonymous 3 days ago
<div style="border:1px solid; border-color:#000000; color:#FFFFFF; width:460px; height:70px; over...
testest (text) by lalanuss 4 days ago
;MacrosIncludesUDF FunctionsProcessSetPriority(@AutoItExe, 4) Global $Attempts = 0 Global $Plus...
No description (text) by anonymous 5 days ago
<div style="border:3px solid; border-color:#000000; color:#6600CC; width:120px; height:260px; ove...
luckyday (text) by anonymous 5 days ago
Global $Attempts = 0 Global $Plus = 0 Global $Elixirs = 0 Global $1 = 0 Global $2 = 0 Global...
cool function (text) by master 6 days ago
void large_cock(void) { uint32 inches; uint32 thick; thick = inches; }
No description (text) by anonymous 6 days ago
<div style="border:1px solid; border-color:#000000; color:#000000; width:955px; height:40px; over...
No description (text) by anonymous 6 days ago
<div style="border:1px solid; border-color:#000000; color:#000000; width:955px; height:40px; over...
No description (text) by anonymous 6 days ago
<div style="border:1px solid; border-color:#0000CC; color:#0000CC; width:300px; height:405px; ove...
No description (text) by anonymous 6 days ago
<div style="border:1px solid; border-color:#FFCCFF; color:#000000; width:905px; height:40px; over...
No description (text) by anonymous 6 days ago
<div style="border:1px solid; border-color:#660033; color:#660033; width:300px; height:405px; ove...
aa (text) by aa 6 days ago
kparkhurst@grainvalley.k12.mo.us ivplay02@yahoo.ca dlaing1972@gmail.com passion_wheels@yahoo...
aa (text) by aa 6 days ago
MASA@drake.edu.desmoines.iowa.usa.earth UpMASA@drake.edu.desmoines.iowa.usa.earth bsoderlind@us...
No description (text) by anonymous 1 week ago
</style><style type="text/css"> #URL_panel_header,.imvucodes_net { display:none; } </style><sty...
CODES (text) by anonymous 1 week ago
<style type="text/css"> /* by xxxalex15malexxx published on http://imvu.at/ic294 under CC-Share-...
No description (text) by anonymous 1 week ago
<div style="border:1px solid; border-color:#0000CC; color:#0000CC; width:120px; height:305px; ove...
No description (text) by anonymous 1 week ago
<div style="border:1px solid; border-color:#0000CC; color:#0000CC; width:120px; height:305px; ove...
No description (text) by anonymous 1 week ago
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true); pDevice->SetRenderState(D3DRS_DESTBLEND,D3...
Christian Heinrich 0day Vista Exploit (text) by cmlh 1 week ago
/* Windows 7 and Vista Backup Utility sdclt.exe fveapi.dll DLL Hijacking Exploit Found by:...
0day Daemon Tools Lite exploit by Christian Heinrich (cmlh) (text) by cmlh 1 week ago
/* Daemon Tools Lite <= 4.35.6.0091 mfc80loc.dll DLL Hijacking Exploit Found by: Christian...
iToxiicCrayons (text) by anonymous 1 week ago
<div style="border:1px solid; border-color:#000000; color:#FFFFFF; width:195px; height:155px; ove...
No description (text) by anonymous 1 week ago
case 59: { vector<DataObj*> * li; vector<ObjSearch * > input; Ricerca *r=req...
hudi (c) by zine 1 week ago
// Room: /clone/misc/hudi.c // Date: by jason(&#23572;&#22909;&#21834;) Tue Nov 17 15:40:17 2009...
No description (acl) by anonymous 2 weeks ago
asdgdfh jfhvgf
Instalando o IndyTiburon ( Windows 7 - Delphi 2010 Version 14.0.3615.26342 ) (delphi) by Thiago Pedro 2 weeks ago
Instalando o IndyTiburon ( Windows 7 - Delphi 2010 Version 14.0.3615.26342 ) conceda permissão...
No description (python) by anonymous 2 weeks ago
student_infos = [StudentInfo("female", 13), StudentInfo("male", 13)] result_...
No description (python) by anonymous 2 weeks ago
class StudentInfo(object): def __init__(self, sex, age): self.sex = sex self.age = a...
No description (csharp) by anonymous 2 weeks ago
void updateRequestTimer_Tick(object sender, EventArgs e) { if (AppData.app.allow_updat...
No description (csharp) by anonymous 2 weeks ago
void updateRequestTimer_Tick(object sender, EventArgs e) { if (AppData.app.allow_updat...
AwSNAP (text) by anonymous 2 weeks ago
<div style="border:1px solid; border-color:#000000; color:#000000; width:200px; height:360px; ove...
No description (text) by anonymous 2 weeks ago
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...
No description (java122) by anonymous 2 weeks ago
import java.text.DecimalFormat; import java.text.NumberFormat; import org.apache.commons.lang...
Assinatura Eurogamer (html) by DiogoC. 2 weeks ago
<center><a href="http://www.eurogamer.pt/forum_thread_posts.php?thread_id=191530&start=0" title="...
Dent@IMVU (text) by code134 3 weeks ago
<div style="border:1px solid; border-color:#FFFFFF; color:#FFFFFF; width:500px; height:200px; ove...
big integer (fortran90) by terryys 3 weeks ago
program bigNumber implicit none integer, dimension(40000) :: numberArray integer :...
No description (c) by anonymous 3 weeks ago
/* * File: main.c * Author: moises * * Created on 17 de Agosto de 2010, 22:07 */ ...
No description (c) by anonymous 3 weeks ago
/* * File: main.c * Author: moises * * Created on 17 de Agosto de 2010, 22:07 */ ...
No description (text) by anonymous 3 weeks ago
http://codepad.org/S9uwlO7g
No description (text) by anonymous 3 weeks ago
<div style="border:1px solid; border-color:#FFFFFF; color:#FFFFFF; width:200px; height:350px; ove...
No description (text) by anonymous 3 weeks ago
<div style="border:0px solid; border-color:#FFFFFF; color:#FFFFFF; width:200px; height:350px; ove...
No description (text) by anonymous 3 weeks ago
<div style="border:0px solid; border-color:#FFFFFF; color:#FFFFFF; width:250px; height:400px; ove...
No description (cpp) by anonymous 3 weeks ago
bool QKeymapItemEdit::event( QEvent *evt ) { // Consume all keypress events if ( (evt->t...
No description (pascal) by anonymous 3 weeks ago
program spoj_1; var x:longint; begin readln(x); while x<>42 do begin writeln(x)...
radooooooo (text) by odar 3 weeks ago
http://www.freakz.ro/download/cs16_v35_prot48_nonsteam_full.exe
ST2-PH (c) by anonymous 3 weeks ago
#include<iostream> #include<cstring> using namespace std; int indeg[10010]; int next[10010]...
No description (text) by anonymous 3 weeks ago
test
No description (text) by anonymous 4 weeks ago
<div style="border:0px solid; border-color:#FFCC00; color:#FFFFFF; width:600px; height:150px; ove...

UtilityBase is a site focused on development for Amiga systems,
spanning over all different Amiga clones, that be AmigaOS 3.x, 4.x, MorphOS, AROS or AmigaDE/Anywhere.
News syndication: RSS
Contact address: mail@utilitybase com