We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'd like to output my data stored in an array in MCU AT89S52 by a frequency 1MHz, which means output a series data bit by bit every 1/1M second.
How can I generate a 1M clock or input a 1M clock? Hoe can I output the data bit by bit every 1/1M second?
Any suggestion for these by C51 uvision4 compiler?
Thanks.
I'v fixed my code. There's no error now, but the result isn't right.
NO data has outputed from Pin1.3
Anything wrong here?
#include <AT89X52.H> #include <stdio.H> sbit dataIN = P1^3; //Output volatile char Data = 0xAA; void ex0_isr(void) interrupt 0 { if ((Data & 0x80) == 0) dataIN = 0; else dataIN = 1; Data<<=1; } void main() { IT0 = 1; // falling edge on /INT0 (P3.2) EX0 = 1; // Enable EX0 Interrupt EA = 1; // Enable Global Interrupt Flag }
http://www.keil.com/forum/62462