Hi,
Very new to this compiler: Mikrobasic Pro for PIC32. Processor is: PIC32MX170F256B.
Trying to send a text character to a Terminal at 19200.
My processor has no external Crystal, RC network or Oscillator. Using the internal oscillator.
Problem: I'm unsure about the operating frequency of this processor, however I am using a logic probe and see no data coming out the UART at all when I run the code.
Program is:
main:
' CHECON = 0x32
' AD1PCFG = 0xFFFF ' Configure AN pins as digital I/O
ANSELA = 0
ANSELB = 0
UART1_Init(19200) ' Initialize UART module at 19200 bps
Delay_ms(100) ' Wait for UART module to stabilize
UART1_Write_Text("A")
end.
The first two lines do not compile with this processor. Have substituted ANSELA/B to disable ADC in lue of this.
Apart from studying the datasheet further, any help would be appreciated!
Thank you!
Transmit ASCII character using UART - PIC32MX170F256B.
Re: Transmit ASCII character using UART - PIC32MX170F256B.
Project attached.
Tested and working.
EDIT: Just realised that you are using BASIC, not C. (must learn to read more carefully).
Attachment is no good other than to give an idea. I do not have a BASIC compiler.
Tested and working.
EDIT: Just realised that you are using BASIC, not C. (must learn to read more carefully).
Attachment is no good other than to give an idea. I do not have a BASIC compiler.
- Attachments
-
- forum.zip
- (101.64 KiB) Downloaded 149 times
Start every day with a smile...... (get it over with)
Re: Transmit ASCII character using UART - PIC32MX170F256B.
Made a BASIC version of the program for you.....
Tested and working.
Tested and working.
- Attachments
-
- forum.zip
- (165.73 KiB) Downloaded 154 times
Start every day with a smile...... (get it over with)
Re: Transmit ASCII character using UART - PIC32MX170F256B.
Thank you very much for the advice, and time spent putting this together.
The program works well!
All the best...
The program works well!
All the best...
Re: Transmit ASCII character using UART - PIC32MX170F256B.
Forgot to say...
Welcome to the forum
Welcome to the forum
Start every day with a smile...... (get it over with)