-1
我想通過使用bitbanging方法發送'A'字符。誰能幫我寫在send_serial()函數的代碼使用bitbanging方法發送'A'字符
void send_serial()
{
//send data
}
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
//Setup_Oscillator parameter not selected from Intr Oscillator Config tab
//!!!!!!!!!!!deney!!!!!!!!!!!!!
//c6 pin using for data transfer
//config tris
//set_tris_c(??)
while(1)
{
//'A' on ascii 0x41
send_serial();
delay_ms(1000);
}
}
這功課呢? – t0mm13b 2011-04-20 23:21:32
哪個輸出位應該被驅動? – wallyk 2011-04-20 23:30:25
聽起來不愉快。你真的應該弄清楚你的輸出波形是什麼樣的。這裏的一切都應該是直截了當的。 – 2011-04-21 06:17:23