326 Threads found on edaboard.com: Code 16 Digit
I am a beginner on PIC Programming and using PStart Programmer for programming (asm). Can anyone help to provide on a Static LCD display (1 line 16 digit) sample program source code, for displaying Temperature eg 12.5°C with range from 0°C to 30°C when the control input voltage varies from 0V - 10Vdc or 0V - 5Vdc using a PIC16F84A Chip? LCD Panel d
Microcontrollers :: 15.10.2009 05:34 :: Bernice Lim :: Replies: 2 :: Views: 2031
; This is a simple algorithm and its 8051 microcontroller implimentation
; to convert binary to BCD .
; Modifications to my code is highly welcomed. If you make changes to this code
; This alorithm I got from following forum
; ------- Date: 19970630
; ------- From: Brian Trial
; ------- To: Mot-68HC
Microcontrollers :: 24.02.2003 21:30 :: yager :: Replies: 5 :: Views: 3147
I did it before using Microcontroller, so I'll explain the idea and you can translat it into HDL.
Suppose you have number equal 32 (in binary form and you want to covert to decimal
1- Divide 32 by 10 --> it will produce 3 and the renaider is 2
2- the remaider 2 is the least significat digit in decimal number you can use a table like to generat t
PLD, SPLD, GAL, CPLD, FPGA Design :: 27.04.2004 10:02 :: Al Farouk :: Replies: 4 :: Views: 1122
I have used this code in Big segment counter project.
The input is 16 bit number in R2 and R3, And the output is 5 digits in ASCII stored in RAM from 0x30-0x34
; | Purpose: Routine to convert a 16bit binary number in ASCII
Microcontrollers :: 04.02.2005 10:26 :: SphinX :: Replies: 4 :: Views: 2249
Here is the verilog code!
/* leap years are all the years divisible by 4,
except that years divisible by 100 are not leap years,
but years divisible by 400 are leap years.
Encoding the year:
binary ? easy for divisible by 4,
but difficult for 100 and 400 (not powers of 2)
BCD ? easy for 100
PLD, SPLD, GAL, CPLD, FPGA Design :: 06.06.2005 09:05 :: nand_gates :: Replies: 1 :: Views: 783
code sample from ET-JRAVR V1.0 + SDP8 ( )
;* APPLICATION NOTE FOR THE CP-JRAVR *
;* Control Board :CP-JRAVR
Microcontrollers :: 22.06.2005 07:26 :: nooknikz :: Replies: 6 :: Views: 2094
What you need to implement and what will be very handy later is serial port interrupt subroutine. If you don't know how to do this check out this code:
Make sure that it is working correctly. To do this connect your ?P ( I assume that you have RS-232 driver such as MAX202, 232 ..) to a PC and start any
Microcontrollers :: 16.07.2005 05:18 :: IanP :: Replies: 13 :: Views: 2161
What you need is a hex -> bcd converter.
and then expand the packed BCD format and add to each number 0x30 so you will get it in the ASCII code.
Microcontrollers :: 20.10.2005 20:26 :: Gomez :: Replies: 13 :: Views: 10200
Is this what you mean?
char hex_string = "2F1C";
value = (int)strtol(hex_string, NULL, 16);
/* sscanf(hex_string, "%x", &value); */
printf("%s hex = %d decimal\n", hex_string, value);
2F1C hex = 12060 decimal
Note, sscanf() w
Microcontrollers :: 30.12.2005 01:19 :: echo47 :: Replies: 12 :: Views: 11011
I got this from a friend.
I hope it helps.
Matlab Application - Curve fitting etc.
Let us do some curve fitting. We need a curve. We already have a Bezier curve that we just generated. We will use that curve for some of the exercises. Since we can create the Bezier curve when we want using the script we will work with the
Mathematics and Physics :: 20.04.2006 14:13 :: dunn :: Replies: 2 :: Views: 1426
It seems to me that you are expecting people to do the work for you. If you want to modify the code for greater efficiency you first need to understand it, well. Then when you do, read as many articles on the subject - then and only then return to the problem and your question will be answered.
There?s a book on my shelf called "modern
PC Programming and Interfacing :: 22.05.2006 14:09 :: polus :: Replies: 1 :: Views: 935
I need a simple circuit with VB code that can read a PIC data (numeric) like 16 digit serial numbers encoded in PIC (PIC12C508/509) via COM1 or COM2
Any idea or link will be appreciated
Microcontrollers :: 09.06.2006 07:26 :: kasamiko :: Replies: 9 :: Views: 921
I'd like use a msp430fg438 to drive a 8-digits
16-segments LCD panel, the use of a particular
configuration ram-bank (that mean a particular
bit represente a particular segment) depends just
of the pin out ? I couldnt get information about why
in the different aplication notes use so extrange
distribution of the bank ram. I should do first th
Microcontrollers :: 31.10.2006 18:56 :: Hermano Canguro :: Replies: 0 :: Views: 376
why is this code is not working?
Bin to Dec convertor....
int Bin2Dek(long * string)
unsigned long dioda;
unsigned int broj = 0;
dioda = *string;
if(dioda == 1) broj += 1;
if(dioda == 1) broj += 2;
if(dioda == 1) broj +
PC Programming and Interfacing :: 16.11.2006 13:51 :: tom_hanks :: Replies: 8 :: Views: 652
Hey Everyone! I found a routine on the web that converts 10 bit binary to 4 digit BCD But I think there is a typo because there is a goto b2d2 and the b2d2 isnt listed on the code...... Anyone have an idea where the b2d2 should go???? Any other 10bit to 4 digit bcd routines???? I'm trying to display voltage on an lcd with a pic 16f676 (...)
Microcontrollers :: 17.11.2006 00:06 :: chevymn1964 :: Replies: 4 :: Views: 3363
That diagram looks weird to me. Just make sure you have a 0.1uf cap connected from VDD to VSS (+5v to GND) near your PIC. For the F88 thats from pins 14 and 5. The cap doesn't (or shouldn't) have a polarity so either way around would do.
And I'm sure the -5v in that diagram is a mistake, that would mean you're running your PIC from -5 to +
Microcontrollers :: 21.11.2006 18:49 :: Buriedcode :: Replies: 9 :: Views: 1136
hmm....can you xplain it more beter?
im having problem on making a VHDL code, coz i dont know the structure....
can you post the structure of it?/
thnx in advance
In terms of structure, it's up to the coder. There are many ways to do it. But I feel as though you are seeking HDl code to solve your problem. You can fin
Electronic Elementary Questions :: 18.12.2006 13:50 :: white_shadow :: Replies: 9 :: Views: 6019
First, while posting codes always use option ..
As it is, it is terrible to read ..
So, what modifications do you need to make?
Microcontrollers :: 08.02.2007 03:55 :: IanP :: Replies: 1 :: Views: 973
Now, I'm having a project using ADC ICL7135. Could anyone help me any concern doccuments and sample code for it. I'm verry thanks!
Regard your repply...!
Please help me!!! :!:
Microcontrollers :: 28.06.2007 10:51 :: member_tdh :: Replies: 3 :: Views: 1139
Try this, or browse code on same site. ;)
Microcontrollers :: 10.12.2007 13:17 :: bungee- :: Replies: 3 :: Views: 1956
In any case you have to set the external address of 24xx to match with the LS three bits of the address byte. I could not find from the data sheet if the five bit control code will change under some conditions, so I suggested you to select an address different from RTC's address, using the external address. So long as the device addresses ar
Microcontrollers :: 06.04.2008 07:34 :: laktronics :: Replies: 69 :: Views: 6220
On a quick look, the code looks like displaying a three digit number (possibly on a 3-seven segment display).
On a closer look: there are 2 functions on the assembly code.
1.) B2_BCD - I think this is a routine to convert a byte to bcd. example: B2_BCD(0x14) = 0x20; This has a subroutine adjBCD
2.) bcdsplit - extracting three (...)
Microcontrollers :: 23.07.2008 07:59 :: neoaspilet11 :: Replies: 1 :: Views: 416
Well, this is how you do it. I will let you write the code.
First of all, clear the upper bits by doing an AND with immediate data 0x0F.
Then compare the remaining number with 9. If it's less than or equal to 9, then do an OR with 0x30H and that is the ASCII code.
If the number is greater than 9, then subtract 9 and then do an OR with 0x40
Microcontrollers :: 28.10.2008 17:42 :: VVV :: Replies: 8 :: Views: 668
is this the sort of thing your looking for as a general idea
int HexToDec(int nNumToConvert) // recursive fn
int nConverted = 0; // Clear this for calculation
nQuotient = (nNumToConvert / 16);
nRemainder = (nNumToConvert % 16);
// could use ternary operator '?' but this 'if ...el
Microcontrollers :: 23.04.2009 12:33 :: trekkytekky :: Replies: 9 :: Views: 4043
u can simply use pic16f877a for this project
the prussure sensor output is to be fed to RA0 or any pin of porta. then u enable the A/D converter and convert the analogue signal to digital one. and divide or multiply with the apropriate factor inside the code.
after this u send it to 7sig display using portb.
the problem is how to c
Hobby Circuits and Small Projects Problems :: 29.06.2009 14:19 :: AhmadAbuOmar :: Replies: 14 :: Views: 3510
Pls help me convert this code for MikroC Compiler. I want to do this project but I couldn't understand this code.
Operation includes displaying the temperature to 4digit 7 segment, can convert from celcius to farenheit, has LDR (changing the display's contrast). tnx
Also, can I change the PIC to 876 instead?
Microcontrollers :: 05.10.2009 04:20 :: kawai :: Replies: 1 :: Views: 2507
we are required to setup the PIC18F452 and enable the ADC module to read a temperature sensor uisng PIC...can anyone help to provide the code? thx in advance...
Microcontrollers :: 12.10.2009 20:02 :: helloarloha :: Replies: 8 :: Views: 5041
I am student 14 years old from Thailand.I am very new in MCU. I would like to use Pic 16f628 insted of 16F84.
Here is the code. Any body help me to change the code for 16F628.
Then I will look&lern how to do. Thank you. Kob kun Krub.:D:D:D
; BINCLK4M.ASM A clock
Microcontrollers :: 30.03.2010 07:17 :: nightbird :: Replies: 1 :: Views: 1054
Hello! i'm new to digital design, especially VHDL. I've designed a 16-bit CLA code and a testbench for it but i'm having difficulty with the testbench part.
It won't even compile and i can't find where i've gone wrong. It would be a great big help if you could lend me a hand. So, here's the code(testbench)
ASIC Design Methodologies and Tools (Digital) :: 26.05.2010 12:22 :: hyonii :: Replies: 1 :: Views: 1332
I am new in Fpga. I am studing vhdl. I saw code like that
type CHAR_RAM_TYPE is array(0 to 39) of std_logic_vector(7 downto 0);
signal charRAM : CHAR_RAM_TYPE := ( 0=>x"41", 1=>x"6E", 2=>x"64", 3=>x"79", 4=>x"FE", 5=>x"47", 20=>x"31", 21=>x"34", 22=>x"2F", 23=>x"30", 24=>x"36", 25=>x"2F", 26=>x"30", 27=>x"37", others=>x"A0");
PLD, SPLD, GAL, CPLD, FPGA Design :: 25.07.2010 20:12 :: uoficowboy :: Replies: 6 :: Views: 991
your schematic suggests otherwise, very convincingly
Means: for save operation, current limiting resistor are required at transistor base and collector terminals.
As mentioned below, the circuit doesn't fit the code. The code expects 4 LED segments at P3.2 to P3.5, activated by a "H" output. Your circuit needs P3.6 and P3.7 actin
Microcontrollers :: 07.09.2010 14:00 :: FvM :: Replies: 18 :: Views: 983
I'm under the impression, that there are some misunderstandings involved. The startup code will never clear data stored in flash or eeprom memory area. So you definitely don't need to modify the startup code.
I understood, that you intend to assign the non-volatile storage to xdata at 0xE000, but it would refer to external RAM, not flash
Embedded Systems and Real-Time OS :: 27.12.2010 18:22 :: FvM :: Replies: 26 :: Views: 3593
Lots of code here for doing such conversions -PIC Microcontoller Radix Math Methods
Microcontrollers :: 19.02.2011 15:11 :: wp100 :: Replies: 13 :: Views: 536
My project is to creat a digit code for 6 employer everyone has his own code
the 6 code should be stored in EEPROM in the pic 16F877
on code is composed of 4 number taken from keypad so the system is to enter the code if it s not one of the codes which was (...)
Microcontrollers :: 09.05.2011 02:33 :: lordmag :: Replies: 1 :: Views: 939
Hi everyone can anyone tell me how to convert binary number to decimal value,
i just need sample code
Microcontrollers :: 26.05.2011 15:23 :: erfan.khalilian69 :: Replies: 9 :: Views: 3800
when you want to check if a button is pressed on not don't use
because the condition you are using needs the complete port to be exactly as specified.
If your buttons are in bit 0 and 1 then check only these bits
Microcontrollers :: 25.06.2011 16:18 :: alexan_e :: Replies: 29 :: Views: 679
Hi, please tell me if this can be synthesised. It worked on modelsim student edition.
also, the lookup table is quite big. i generated it using matlab.
(don't give negative values of n as input. keep the first digit 0. it is signed.)
PLD, SPLD, GAL, CPLD, FPGA Design :: 23.07.2011 16:06 :: rgamma :: Replies: 7 :: Views: 530
hi guys.. can anyone help me with my program? I can't get the output working after doing a simulation.. The output in the waveform shows 'U' - uninitialized...
here is my program
entity key_decode is
--output from decoder
PLD, SPLD, GAL, CPLD, FPGA Design :: 03.08.2011 08:44 :: jianhuachews :: Replies: 10 :: Views: 615
Here is the Conversion Logic:-
temp = MYDATA * 2; //MYDATA is the data coming from the PORT of the Controller to which your ADC of 8bit is connected
//Conversion Process Starts Here
ones = temp%10;
temp = temp/10;
tens = temp%10;
Microcontrollers :: 18.01.2012 17:18 :: Tahmid :: Replies: 9 :: Views: 832
It is a design of a system which reads the card code via interface EM4095 with an antenna, decodes, checks and sends it through the serial port. The reader is based on Attiny13. Program takes only 782 bytes.
Show DIY :: 02.04.2012 22:28 :: Vermes :: Replies: 5 :: Views: 1390
I am programming to convert a c code section into assembly .This is may c code:
// display temperature in led
output_b(maled); // display tens
Microcontrollers :: 08.04.2012 17:52 :: anhnha :: Replies: 10 :: Views: 333
Getting code for your exact problem is is a very rare.
But there so many ppls working on the same display technologies.
You can ask them to facilitate in the same or you can have some sample working product and "reverse engineer" the same.
as following sites seems dealing in the same technologies.
Microcontrollers :: 11.04.2012 09:12 :: vickramlove :: Replies: 14 :: Views: 675
Hi everyone, I want the assembly code for 4 digit 7 segment digital clock for PIC16F877A microcontroller. The two 7 segment for SECONDS & two for MINUTES. I need the code in assembly language not in C or other language. Im using MPLAB IDE v8.20 for coding & Proteus for designing the interface. Plz help me.
Microcontrollers :: 22.06.2012 13:54 :: noor_dhaka :: Replies: 13 :: Views: 1008
i'm new guy for electronic field i have very ittle knowledge about this side so i want to know how to write a code for ultrasonic sensor using Mikroc plz help me friends
Microcontrollers :: 26.07.2012 17:14 :: Nipuna56 :: Replies: 29 :: Views: 4014
This depends on what the specific 7-segment display is that your using. You need to consult the datasheet for your device to see how to interface to the display. Some displays use SPI, which means that you would need to set up SPI on the PIC in order to communicate. Other displays allow you to use GIOs to communicate with the display; it just depen
Microcontrollers :: 26.08.2012 22:08 :: willis... :: Replies: 5 :: Views: 369
I need to convert decimal values 0 to 255 to hex. Can somebody please give me the c code for decimal to hex conversion?
Microcontrollers :: 26.11.2012 20:09 :: internetuser2k12 :: Replies: 46 :: Views: 998
I am wrting to here a part of my code , when it run works normally at the red colored section
password= InputNumber("Enter Password");//Get the keycode of pressed key
Microcontrollers :: 24.12.2012 15:24 :: thannara123 :: Replies: 18 :: Views: 267
Can anybody plz help me in displaying a number (3 digit number) stored in a variable(consider int val)??? The variable keeps getting decremented every second and i need to display it every second!!!
Microcontrollers :: 13.03.2013 20:38 :: Wesley90 :: Replies: 2 :: Views: 67
Here is the Link to Generator,
BIOS Master Password Generator for Laptops
Enter all letters in Capital Letters
Laptop Bios Passwords
Mostly all laptops can be unlocked by master password which unique for every laptop
Mostly all desktops may be unlocked b
General Computer :: 14.04.2013 23:10 :: Yashjovi :: Replies: 0 :: Views: 617
Your problem is apparently just a matter of adapting the new hardware, so if you change only the IO port definitions,
then it should work.
Now about your code:
1. - You wrote functions like clearrow1 to clearrow4. All these functions have no parameters
and their contents just look the same.
Why don't you write just a single function clear r
Microcontrollers :: 29.04.2013 07:53 :: doraemon :: Replies: 3 :: Views: 105