The Philippine Electronics and Technology Forum
February 10, 2012, 12:19:38 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  

Pages: [1]   Go Down
  Print  
Author Topic: ZILOG MICROCONTROLLER (Z8F042A)  (Read 480 times)
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« on: August 24, 2010, 03:36:33 PM »

hello... can i ask help?.. may project kaming ginagawa... disco light gamit ay zilog (z8f042a)... 9x6 leds... our instructor added 8 switches for 8 patterns... hindi namin alam kung paano simulan ang pagprogram gamit ang c language. gumamit din kami ng 8bit shift register na 74LS164... help us pls... malapit na finals...  maraming salamat... "TULONG NIYO KINABUKASAN KO"... huhuhu  Huh Sad
Logged
The Philippine Electronics and Technology Forum
« on: August 24, 2010, 03:36:33 PM »

 Logged
labgruppen
Lead Acid Battery
*******

Pogi/Ganda Points: 70
Offline Offline

Posts: 693


« Reply #1 on: August 24, 2010, 08:22:22 PM »

you should start by defining the sequences of the 8 programs. then you could store the sequences in a two dimmensional array or you could also set up 8 arrays, each of the array containing a particular sequence. then it would only be a matter of selecting which array to display according to which button is pressed.
this is imho a very easy project, so kayang kaya nyo yan.. you should post the schematics for comments and improvement suggestion by the forum members.  i suggest that you use 74ls595 instead of 74ls164. this way, you could shift out the next pattern with out the leds displaying the shifting process..
so post your schematics first, then we'll see.
Logged
hearty_28
LR44 Battery
*

Pogi/Ganda Points: 2
Offline Offline

Posts: 1


« Reply #2 on: August 25, 2010, 06:54:00 PM »

hi darling,

im new to this forum...
i would suggest you would read and research first for the datasheet of that microcontroller...


---char!!!!
Logged
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« Reply #3 on: August 30, 2010, 04:11:42 PM »



here is a similar circuit of our project... are the serial input connection are correct (PA1, PA2,PA3, PA0, PB0)...?
we also dont know where to put the switch sir... sir, hope u'l help us with this... we'll wait for your reply... thnx alot... :(C:\Documents and Settings\Mapet\Desktop
Logged
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« Reply #4 on: August 30, 2010, 04:38:03 PM »



here is a similar circuit of our project... are the serial input connection are correct (PA1, PA2,PA3, PA0, PB0)...?
we also dont know where to put the switch sir... sir, hope u'l help us with this... we'll wait for your reply... thnx alot...



Logged
labgruppen
Lead Acid Battery
*******

Pogi/Ganda Points: 70
Offline Offline

Posts: 693


« Reply #5 on: August 30, 2010, 08:41:26 PM »

^akala ko ba disco lights ang gagawin ninyo na 9x6 LED bat 8x5 na yan? tsk,tsk.. clear naman yata yung "post YOUR schematics first..".
Logged
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« Reply #6 on: September 11, 2010, 12:29:42 AM »

we have attached already the circuit diagram we have designed using the 8 bit shift register 74HC595 with Zilog(Z8F042A)...we have already decided our 1st pattern to be implemented but we don't know how to program it......actually we have 8 patterns but we would like to try first our first pattern to be done before others....we also used switches for  each pattern to be triggered.....we have already made a program for switches:
   
#include <ez8.h  >
                     
void delay(void){
unsigned int i,j;
for(i=1;i<=0xFF;i++)
for(j=1;j<=0xFF;j++);
}
void main(){
PADD = 0x3F;
PAFF = 0x00;

while(1){
if ((PAIN & 0x01)==0x00){
PATTERN1():
delay();
}
if ((PAIN & 0x02)==0x00){
PATTERN2():
delay();
}
if ((PAIN & 0x03)==0x00){
PATTERN3():
delay();
}
}
}
our problem now is that we don't know how to make a program for each pattern....actually last time we have tried our best to make a program for our 1st pattern without using switches...but it doesn't work...
i hope you will help us sir... Sad Sad Sad

              

Logged
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« Reply #7 on: September 11, 2010, 12:43:33 AM »

sir paranz,baka nagtaka po kayo kung bakit  8x6 nalang yung nasa circuit diagram namin actually binago namin ang aming design.sana po tulungan  nyo kami....   
Logged
tiktak
Gas Turbine
**

Pogi/Ganda Points: 171
Offline Offline

Gender: Male
Posts: 2498



WWW
« Reply #8 on: September 11, 2010, 08:13:36 AM »

how do you send the data to the 74HC595? parang unusual kung saan nakalagay yung switch Grin
Logged

Bakit andaming hindi marunong gumamit ng search?Huh
darlingvt
LR44 Battery
*

Pogi/Ganda Points: 3
Offline Offline

Posts: 1


« Reply #9 on: September 11, 2010, 12:02:38 PM »

sir tiktak, bawat switch maykanyakangyang pins kebale pagoff sya yung corresponding pattern hindi magdisplay pero if on sya saka cya magdisplay..ang switch yung magpapatrigger ng output sa microcontroller papunta sa 74HC595. Cheesy
Logged
labgruppen
Lead Acid Battery
*******

Pogi/Ganda Points: 70
Offline Offline

Posts: 693


« Reply #10 on: September 14, 2010, 02:27:26 PM »

imho, there are better ways to select which pattern is to be displayed. you could just simply connect the input of the 595 to a GPIO and just select which pattern to display via firmware. you could use the two extra GPIOs to act as next/prev pattern selector. you could even use the column pins (port C) in conjunction with the two pins to make a 2x5 switch matrix to provide instant access to your patterns.
with regards on how to display your pattern, please review the datasheet of the 595. you will have to create a routine/function that will bit bang your 595 signal requirements such as clock, ser  data, latch, etc.
to give you a clue, assuming you started with all pins Low. Let us assign the 8bit pattern to be displayed as OutputByte.
do the following steps.
1. Test bit0 of OutputByte and set/reset the serial data line according to bit0 (bit7=MSB, bit0=LSB).
2. Set serial/shift clock.
3. Reset serial/shift clock.
4. Shift OutputByte one step to the right. (OutputByte>>1)
5. Go back to step 1 until all bits are shifted out to the 595.
6. set latch line.
7. reset latch line.

note that the above is only a clue, and if you will implement it you will have to correct it to display the OutputByte in the correct manner, that is LSB of OutputByte should be at the LSB of the 595.
i also would want to reiterate the use of arrays to store your pattern data.
you could add another column and connect a seven segment display to it. this will provide a display to show which pattern is currently being displayed.
Logged
The Philippine Electronics and Technology Forum
   

 Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Zilog Microcontroller vs Other Microcontrollers « 1 2 »
Microcontroller/Microprocessor Unit Projects and Programming
sakura 29 2511 Last post October 02, 2009, 11:46:14 PM
by ,,V, (@_@) ,V,,
Zilog Z86 OTP Microcontroller Tutorial « 1 2 »
Zilog Microcontrollers
tiktak 20 1283 Last post October 20, 2010, 10:18:46 PM
by Yuushi
Zilog Microcontroller Question
Zilog Microcontrollers
bongbong 3 240 Last post August 07, 2010, 10:25:58 AM
by cristanboj
ZILOG MICROCONTROLLER (Z8F042A)
Zilog Microcontrollers
darlingvt 0 380 Last post August 24, 2010, 03:41:04 PM
by darlingvt
buy zilog z8f082a microcontroller
General Electronics and Technology Discussion
boninayexpress 2 120 Last post October 30, 2010, 12:44:05 PM
by boninayexpress
zilog microcontroller
Microcontroller/Microprocessor Unit Projects and Programming
mkas18 0 260 Last post December 13, 2010, 09:34:00 PM
by mkas18
SIM900D, Zilog Z8F042A and LED matrix « 1 2 »
Personal, Academic and Commercial Electronics Projects
ionik3 35 548 Last post February 01, 2012, 01:36:53 PM
by ionik3
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!