I wanted to do some motor control stuff. No purpose other than to do something on the bench using microcontrollers and learn (or try to recall theory from 1984!). It seemed too easy so I am looking for input on to how to improve it, ie if I really needed to use a motor in something, what would I do to improve this?
1st question...if I wanted to submit a sketch of the circuit, what is the easiest program to do it up in to post here?
The circuit reads a pot value (ADIN16) (coding basically from Syntax manual), then outputs relative HPWM to a small NPN to drive a large PNP (cause that is what I had in stock) to supply 12 volts to a small hobby motor and vary its speed. (no load)

It seemed to work relatively well, I was surprised. I played around with the duty cycle to see how it affected speed control so values there are just the last ones I plugged in. The motor seemed to vary well from zero to almost max. It did not ever see 12 volts and that is most likely that I did not fully saturate the transistor(s). good enough for this lesson, I figured.
I would suspect MOSFet's would be better but have not done much with them. I have a bunch but not sure if they are suitable so thought I would start with the power transistor.
2nd question, when would you use a Mosfet over a bi-polar transistor?
This is pretty simple stuff compared to some of the postings I have been reading so that is part of the reason for posting it, just to give some real newbies something to read that doesn't need interpreting....
3rd question...when you techs start a project, does anyone use flowcharts anymore? How do you get started? I figured a flowchart,leading to roughing out loops in Studio, then filling in coding, dealing with the duty of each loop,...sound reasonable? Sounds like a good way to learn, then you use commands as you need them. but maybe times have changed....?
; Nano 8
; this program is the first motor control circuit
; it uses the a/d practice program from the syntax manual for ADIN16
; and I added the HPWM command to vary 12 vdc hobby motor speed according to a/d value on p0
; motor current is handled with 2SB554 PNP power transistor driven by 2N3904
; Nano is on 5 volt supply while motor runs on 12 volts
;
temp var word
main
adin16 p0,temp ;adin16 is a higher resolution conversion
temp = temp>>4 ;temp will hold a 12bit decimated A/D conversion.
serout s_out,i9600,[0, "Conversion = ",dec temp,13]
hpwm p2,temp, 500 00
; pause 200
goto main