To achieve hard-edged painted strokes, which align to individual pixels, you can use the Pixel Brush.
The Pixel Tool adds pixels directly to the layer using the same principles as using the Paint Brush Tool. You can select from any of the brushes from the Brushes panel to use with the Pixel Tool.
To apply pixel brush strokes:
Use the Layers panel to select the layer that you want to work on, or create a new pixel layer.
Select the Pixel Brush tool.
From the Brushes panel, select a brush thumbnail of your choice. Use hard-edged brushes from the Basic category for best results.
Adjust the context toolbar settings.
Select a brush stroke color from the context toolbar or Color panel.
Drag on the page in the direction that you want the brush stroke to follow.
To smooth brush strokes as you paint:
On the context toolbar, enable the Stabilizer option and choose one of the following:
Rope mode—drag the stroke end by a 'rope' that smooths the stroke but lets you introduce sharp corners at increasing Length (radius) values by redirecting the slackened rope.
Window mode—smooths the stroke by averaging the stroke's position over a Window whose size is configurable.